Skip to content
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

Merged
merged 21 commits into from
Aug 1, 2018
Merged

Conversation

vincent1173
Copy link
Contributor

No description provided.

"archivePackages": [
{
"archiveName": "openssl-1.0.2l-x64_86-win64.zip",
"url": "https://indy.fulgan.com/SSL/openssl-1.0.2l-x64_86-win64.zip",
Copy link
Contributor Author

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": {
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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) {
Copy link
Member

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/";
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}

this.isADFSEnabled = isADFSEnabled;
Copy link
Member

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?

Copy link
Contributor Author

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');
Copy link
Member

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": {
Copy link
Member

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) {
Copy link
Contributor Author

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",
Copy link
Contributor Author

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",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ms: 0.7.3

@vincent1173 vincent1173 merged commit 0a3f9a4 into master Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: AzureAppService Label to monitor Azure App Service issues Area: Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants