{"action":"created","issue":{"url":"https://api.github.com/repos/spinnaker/spinnaker/issues/2519","repository_url":"https://api.github.com/repos/spinnaker/spinnaker","labels_url":"https://api.github.com/repos/spinnaker/spinnaker/issues/2519/labels{/name}","comments_url":"https://api.github.com/repos/spinnaker/spinnaker/issues/2519/comments","events_url":"https://api.github.com/repos/spinnaker/spinnaker/issues/2519/events","html_url":"https://github.com/spinnaker/spinnaker/issues/2519","id":303545648,"number":2519,"title":"Enable 0auth2 for Spinnaker in Azure error on address redirect","user":{"login":"matthew-devops","id":34167407,"avatar_url":"https://avatars0.githubusercontent.com/u/34167407?v=4","gravatar_id":"","url":"https://api.github.com/users/matthew-devops","html_url":"https://github.com/matthew-devops","followers_url":"https://api.github.com/users/matthew-devops/followers","following_url":"https://api.github.com/users/matthew-devops/following{/other_user}","gists_url":"https://api.github.com/users/matthew-devops/gists{/gist_id}","starred_url":"https://api.github.com/users/matthew-devops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthew-devops/subscriptions","organizations_url":"https://api.github.com/users/matthew-devops/orgs","repos_url":"https://api.github.com/users/matthew-devops/repos","events_url":"https://api.github.com/users/matthew-devops/events{/privacy}","received_events_url":"https://api.github.com/users/matthew-devops/received_events","type":"User","site_admin":false},"labels":[{"id":621997857,"url":"https://api.github.com/repos/spinnaker/spinnaker/labels/auth","name":"auth","color":"fef2c0","default":false},{"id":343315794,"url":"https://api.github.com/repos/spinnaker/spinnaker/labels/provider/azure","name":"provider/azure","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-08T16:35:06Z","updated_at":"2018-03-28T15:12:34Z","closed_at":null,"author_association":"NONE","body":"*Cloud Provider*\r\nKubernetes, Azure\r\n\r\n*Environment*\r\n\r\nSpinnaker K8s deployed to azure vms, external DNS is not enabled in favor of ssh.\r\n\r\n*Feature Area*\r\n\r\noauth2 as the login for spinnaker after ssh\r\n\r\nExpected Result: redirect to login page \r\n\r\nlocalhost:9000 should redirect to URL provided in config and land on Azure login page\r\n\r\n*Steps to Reproduce*\r\n\r\nAttempting to setup OAuth2 for Azure\r\n\r\nError: AADSTS90002: Requested tenant identifier '${azuretenantid}' is not valid.\r\n\r\nAddress of redirection https://login.microsoftonline.com/$%7BazureTenantId%7D/oauth2/authorize?resource=https://graph.windows.net&client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&redirect_uri=http://localhost:8084/login&response_type=code&scope=profile&state=wTeKZ1\r\n\r\nconfig\r\n\r\n   azure:\r\n     enabled: true\r\n     accounts:\r\n     - name: exp\r\n       requiredGroupMembership: []\r\n       providerVersion: V1\r\n       clientId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\r\n       appKey: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\r\n       tenantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\r\n       subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\r\n       defaultResourceGroup: spinnakerk8s\r\n       defaultKeyVault: KeyVault\r\n\r\n   authn:\r\n     oauth2:\r\n       enabled: true\r\n       client:\r\n         clientId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\r\n         clientSecret: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\r\n         accessTokenUri: https://login.microsoftonline.com/${azuretenantid}/oauth2/token\r\n         userAuthorizationUri: https://login.microsoftonline.com/${azuretenantid}/oauth2/authorize?resource=https://graph.windows.net\r\n         clientAuthenticationScheme: query\r\n         scope: profile\r\n       resource:\r\n         userInfoUri: https://graph.windows.net/me?api-version=1.6\r\n       userInfoMapping:\r\n         email: userPrincipalName\r\n         firstName: givenName\r\n         lastName: surname\r\n       provider: AZURE\r\n\r\nAttempted Solutions:\r\n-Correct accessTokenUri address to https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/token\r\n-userAuthorizationUri: https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/authorize?resource=https://graph.windows.net\r\n\r\n-Same correction but to ${azure_tenant_id} to match azure-linux.json variable\r\n\r\n-Same correction but to common and organization.  No matter the adjustment in config it isn't passed.\r\n\r\n-Reduce Spinnaker version 1.5.0 Attempt above changes\r\n\r\n-Manually change error page address to include tenant-id page properly pulls up login page\r\n\r\nResult:  Despite changes, the address is always corrected to include ${azuretenantid} which errors\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/spinnaker/spinnaker/issues/comments/376922964","html_url":"https://github.com/spinnaker/spinnaker/issues/2519#issuecomment-376922964","issue_url":"https://api.github.com/repos/spinnaker/spinnaker/issues/2519","id":376922964,"user":{"login":"matthew-devops","id":34167407,"avatar_url":"https://avatars0.githubusercontent.com/u/34167407?v=4","gravatar_id":"","url":"https://api.github.com/users/matthew-devops","html_url":"https://github.com/matthew-devops","followers_url":"https://api.github.com/users/matthew-devops/followers","following_url":"https://api.github.com/users/matthew-devops/following{/other_user}","gists_url":"https://api.github.com/users/matthew-devops/gists{/gist_id}","starred_url":"https://api.github.com/users/matthew-devops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthew-devops/subscriptions","organizations_url":"https://api.github.com/users/matthew-devops/orgs","repos_url":"https://api.github.com/users/matthew-devops/repos","events_url":"https://api.github.com/users/matthew-devops/events{/privacy}","received_events_url":"https://api.github.com/users/matthew-devops/received_events","type":"User","site_admin":false},"created_at":"2018-03-28T15:12:34Z","updated_at":"2018-03-28T15:12:34Z","author_association":"NONE","body":"By not updating any of the configurations accept whats in the documentation and your solution the addition of profile config.  I was able to get this working.  Thank you for your answer.  I feel that it would be wise to add this to the actual documentation.  If only as an aside to note the updating of the gate. "}}
{"actor":{"display_login":"matthew-devops"}}