Users authentication with OpenID and Azure AD
This integration works with on-premises deployment only. For SaaS solution integration with external IAM providers will be introduced in the beginning of 2024.
Prerequisites
- You need to have administrative access to your Azure AD or an admin near you.
- You need the access to Allure Testops configuration files.
- You need to be able to apply the changes in the configuration, which could require some downtime.
- Allure Testops needs work behind HTTPS, i.e. there must be something like reverse proxy between Allure Testops and GSuite servers. Please consult your network administrator or DevOps to ensure proper configuration on the network side.
Integration of Allure Testops and Azure AD
Given
- Allure Testops is deployed and accessible on
http://allure.local
your URLs definitely will be different. - Your Azure AD instance settings are available here: https://portal.azure.com
Configuration on Azure AD side
Here is Microsoft's guide on how to make all the needed preparations for the integration: Open the link
On the previous step we've got the following parameters we are going to use for the integration:
- Application (client) ID.
- Client's secret (token).
- OpenID connect metadata
Application ID
Client's secret
OpenID connect metadata
This parameter is to be used without this part: .well-known/openid-configuration
Configuring Allure Testops
On Allure Testops side you need to update the configuration of gateway service.
See below for the deployment specific examples.
For Kubernetes deployment you need to configure the integration with Azure as openid via oidc section of values.yaml
file.
oidc:
enabled: true
# This parameter is responsible for matching group role attribute
roleAttribute: role
client:
name: Azure
# Your clientId (Get one from OIDC provider), described above in Azure configuratin section
id: <Application (client) ID>
# Your clientSecret (Get one from OIDC provider)
secret: <Client secrets (Token)>
# This parameter lets know where your OIDC provider is going to redirect client after successful login
redirectURI: https://<your-domain>/login/oauth2/code/allure
# URL of your auth provider, described above in the secion of Azure configuration
issuerURI: <OpenID Connect metadata>
# This parameter tells Allure Testops whet to use as username. It could be be email or preferred_username
userNameAttribute: email
scope: openid,email,profile
# other parameters present in the values file are not required by Azure OpenID integraion
# Syncs User Role by Group membership on any login
syncRoles: false
# Maps your OIDC groups on Allure Groups
userGroupName: allure_users
adminGroupName: allure_admins
Now, you need to update your Allure Testops configuration as usual for Kubernetes installation using Helm's commands. to use Azure AD as Identity provider.
Setting the default authentication way
When you've updated the settings and these were successfully applied, you need to check the authentication by trying to log in using the following URL:
http://allure.local/login/oauth2
,
Your URL will differ. Only this part you need to take for test from this guide: /login/oauth2
When you've successfully tested the authentication, you can switch to OpenID as main authentication method.
For Kubernetes deployment you need to configure the integration with Azure as openid via oidc section of values.yaml
file.
allure:
<...>
auth:
# Available options system / openid / saml2 / ldap
primary: openid
Now, you need to update your Allure Testops configuration as usual for Kubernetes installation using Helm's commands. to use Azure AD as Identity provider.
Setting the default role for new user registering via OpenID/AzureAD
Why
If no additional setting made all new users will have ROLE_USER
by default and will consume 1 license.
What
To prevent new users consuming the licenses you need to define the default role for them as ROLE_GUEST
, when they register in the system using openid/azuread. This will ensure they will have read only access by default and won't consume any licenses in the system.
How
Name of the configuration parameter will vary depending on the deployment type.
For Kubernetes deployment you need to configure the integration with Azure as openid via oidc section of values.yaml
file.
Parameter defaultRole
need to be set for setting the default role for a new user which logs in to Allure Testops using OpenID.
allure:
<...>
auth:
# Available options system / openid / saml2 / ldap
primary: openid
# Allowed roles: ROLE_ADMIN, ROLE_USER, ROLE_GUEST, preferred ROLE_GUEST + sync of roles.
defaultRole: ROLE_GUEST