Posts

Showing posts from November, 2022

Job Access Tokens || Authorize REST API calls to access resources in ADO using Job Access Tokens

Image
  Author: Akhil M Anil || DevOps Engineer For applications that interface with Azure DevOps Services, you must authenticate to gain access to resources like REST APIs. There are different ways to authenticate our applications with Azure DevOps Services. In this article we will use job access token/system access token (SYS_TOKEN) to authenticate into Azure DevOps. A job access token is a security token that is dynamically generated by Azure Pipelines for each job at run time. The agent on which the job is running uses the job access token in order to access these resources in Azure DevOps. It is fully possible to use System Access Tokens and eliminate the need for PATs in ADO pipeline for authorize the REST API calls to ADO. Furthermore, there is no need to save any credentials to files on disc and the System Access Tokens can be leveraged transiently as environment variables scoped to a specific job. The token's permissions are derived from job authorization scope the permissions

Authenticate to Azure DevOps using PAT token

Image
  Author: Akhil M Anil || DevOps Engineer For applications that interface with Azure DevOps Services, you must authenticate to gain access to resources like REST APIs. There are different ways to authenticate our applications with Azure DevOps Services. In this article we will use a personal access token (PAT) to authenticate into Azure DevOps. A personal access token contains your security credentials for Azure DevOps. A PAT identifies you, your accessible organizations, and scopes of access. As such, they're as critical as passwords. Since PAT is as identical as a user credential many organizations restrict its usage in Azure DevOps Api's instead promote the usage of any other authentication method or store the PAT token in Key-Vaults and use them. 1. Let's create a PAT token in ADO.  Sign into your organization From the home screen select the user settings and select Personal Access Token. Select +New Token. Give a name for the token, select the organization then set y

Usage of Variable Template in Azure DevOps Pipelines

Image
  Author: Akhil M Anil || DevOps Engineer Let's understand what variables in Azure DevOps are:  Variables give us a convenient way to get key bits of data into various parts of the pipeline. The most common use of variables is to define a value that we can then use in our pipeline. The value of a variable can change from run to run or job to job in your pipeline. Different types of variables are: User-defined variables System variables Environment variables User-defined Variables The variables defined by the user are called user-defined variables. In YAML pipelines, we can set variables at the root, stage, and job levels. We can use a variable group to make variables available across multiple pipelines or we can use templates to define variables that are used in multiple pipelines in one file. In this blog, we will discuss variables defined in a template file and create a simple pipeline for getting variables from the variable template.  Advantages of using Variable Templates over