-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Certificate support in Azure RM endpoint #7678
Conversation
"archivePackages": [ | ||
{ | ||
"archiveName": "openssl-1.0.2l-x64_86-win64.zip", | ||
"url": "https://indy.fulgan.com/SSL/openssl-1.0.2l-x64_86-win64.zip", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO : update openssl package to vstsagent blob
@@ -104,6 +105,11 @@ | |||
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", | |||
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" | |||
}, | |||
"buffer-equal-constant-time": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these new dependencies? Did you run them through OSS scans and should they be included in TPN?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked with OSS , all the new modules are IP scanned. will check with PMs for TPN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few newly introduced modules require IP scan and requested for same.
Will update TPN in a separate PR.
@@ -16,7 +23,7 @@ export class ApplicationTokenCredentials { | |||
public msiClientId: string; | |||
private token_deferred: Q.Promise<string>; | |||
|
|||
constructor(clientId: string, domain: string, secret: string, baseUrl: string, authorityUrl: string, activeDirectoryResourceId: string, isAzureStackEnvironment: boolean, scheme?: string, msiClientId?: string) { | |||
constructor(clientId: string, domain: string, secret: string, baseUrl: string, authorityUrl: string, activeDirectoryResourceId: string, isAzureStackEnvironment: boolean, scheme?: string, msiClientId?: string, authType?: string, certFilePath?: string,isADFSEnabled?: boolean) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - space before isADFSEnabled
var deferred = Q.defer<string>(); | ||
let webRequest = new webClient.WebRequest(); | ||
webRequest.method = "POST"; | ||
webRequest.uri = this.authorityUrl + (this.isADFSEnabled ? "" : this.domain) + "/oauth2/token/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give example of how the Uri is for AAD and ADFS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
} | ||
|
||
this.isADFSEnabled = isADFSEnabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the use case of this Boolean is to determine the tenant id (or domain) later. Why can't the tenant Id (or domain) be directly stored instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tenantID might be used in future reference, so didnt make it null for loginAuth
@@ -49,10 +63,13 @@ export class AzureRMEndpoint { | |||
this.endpoint.activeDirectoryResourceID = this.endpoint.url; | |||
} | |||
|
|||
this.endpoint.isADFSEnabled = this.endpoint.environmentAuthorityUrl.endsWith('/adfs'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this assumption (that URL ends with adfs) true always? Is there any documentation on this?
@@ -9,6 +9,20 @@ | |||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", | |||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" | |||
}, | |||
"base64-url": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar query as above. Are there new modules and have we gone through the compliance process for these?
@@ -39,6 +40,19 @@ export class AzureRMEndpoint { | |||
activeDirectoryResourceID: tl.getEndpointDataParameter(this._connectedServiceName, 'activeDirectoryServiceEndpointResourceId', true) | |||
} as AzureEndpoint; | |||
|
|||
|
|||
this.endpoint.authenticationType = tl.getEndpointAuthorizationParameter(this._connectedServiceName, 'authenticationType', true); | |||
if(this.endpoint.authenticationType && this.endpoint.authenticationType == constants.AzureServicePrinicipalAuthentications.servicePrincipalCertificate) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"joi": "6.10.1", | ||
"jws": "3.1.3", | ||
"lodash.once": "4.1.1", | ||
"ms": "0.7.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ms: 0.7.2
"requires": { | ||
"joi": "6.10.1", | ||
"jws": "3.1.5", | ||
"ms": "0.7.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ms: 0.7.3
No description provided.