Closed jack89roberts closed 5 years ago
Let's use Azure AD - see https://docs.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad#-configure-with-advanced-settings
wimbledon-planner
KeyVault
app-id
app-secret
turing-tenant-id
"oauth2AllowIdTokenImplicitFlow": true
and "oauth2AllowImplicitFlow": true
in the app manifest)https://wimbledon-planner.azurewebsites.net/.auth/login/aad/callback
app-id
secret in wimbledon-planner
KeyVault)https://login.microsoftonline.com/<turing-tenant-id>
, using turing-tenant-id
secret in wimbledon-planner
KeyVault)app-secret
secret in wimbledon-planner
KeyVault)@jack89roberts Please could you review the above and let me know if (i) any of the instructions are not clear and (ii) do some ad-hoc testing of your own to confirm access control works as you expect.
Nice! It works on my phone (using mobile data) as well - asks me to login and then the app works as normal afterwards.
The only thing I'm unsure about in the instructions is this part:
Azure AD Enterprise app setup
- Check the "Access tokens" and "ID tokens" boxes under "Authentication -> Implicit grant" (or equivalently set
"oauth2AllowIdTokenImplicitFlow": true
and"oauth2AllowImplicitFlow": true
in the app manifest)- Set the redirect URL to
https://wimbledon-planner.azurewebsites.net/.auth/login/aad/callback
Where are these settings and are we supposed to have access to them or is it part of what IT sets up (e.g. if it's in "App registrations" then I get a "you do not have access" error back)?
It's part of the set up IT do for the AD enterprise app. I've updates the notes to reflect this.
The app registration expired and had to be renewed. These are the steps for renewing it:
Create a ticket with IT asking them to renew the active directory app registration for Wimbledon Planner (I also included the redirect URL https://wimbledon-planner.azurewebsites.net/.auth/login/aad/callback and the previous ticket numbers C1910-085 and I2010-637).
IT will send a new secret value.
Update the app-secret
secret in the wimbledon-planner
key vault in the wimbledon-planner-production
resource group.
app-secret
from the listUpdate the secret value in the wimbledon-planner
app service in the wimbledon-planner-production
resource group.
(edit: 2022 - unsure whether this is required in addition to/instead of step above) Update the secret value in the wimbledon-planner
app service in the wimbledon-planned-production
resource group:
I then restarted the app service, but I'm not sure whether this is necessary.
16/1/2024: Client secret was renewed. The steps are similar to above, but the Azure interface is slightly different:
wimbledon-planner
key vault in the wimbledon-planner-production
resource group. From the left menu, select Objects > Secrets. Click on app-secret
and create a new versionwimbledon-planner
App Service, select Settings > Configuration, and select Application Settings from the tabs in that page. Click on MICROSOFT_PROVIDER_AUTHENTICATION_SECRET
and paste the new secret as the value there.
Wimbledon-Planner
identity provider in the list shown there. It brings you to the same screen.Wait a couple of minutes and the app should work. I didn't need to restart it.
Thanks Jon!
Currently the Azure app is restricted to Turing IP addresses, but open to anyone trying to access it whilst at the Turing.
As a first pass to making the app accessible to Turing folk offsite, we'll incorporate Azure Active directory login.
Note that this is still fairly "hacky" as the app is accessing Github and Harvest with credentials many users with Turing AAD credentials will not have. See issue #50 as placeholder for improvements to authentication.