Skip to content

Latest commit

 

History

History

oauth

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

OAuth Testing Suite

Running Tests for Azure AD OAuth

In order to test the OAuth flow, you need to set up an application in Azure Active Directory (Azure AD) with the necessary permissions. Follow these steps:

1. Create an application in Azure AD

  • Go to Azure Portal > Azure Active Directory > App registrations > New registration.
  • Fill in the name, check Accounts in this organizational directory only (Default Directory only - Single tenant) and click Register.
register_application_1

2. In the application overview, navigate to API permissions.

  • Click Add a permission.
  • Select Microsoft Graph > Delegated permissions.
  • Add the following permissions:
    • User.ReadWrite.All
    • Group.ReadWrite.All
    • RoleManagement.ReadWrite.Directory
    • AppRoleAssignment.ReadWrite.All
    • Application.ReadWrite.All
  • Click Add permissions.
app_permissions_2

3. Click Grant admin consent for <your tenant name>.

grant_permissions_3

4. Get back to overview and generate a client secret.

  • Navigate to Certificates & secrets.
  • Click New client secret, fill in the description and expiration, then click Add.
  • Copy the value of the client secret.
client_secret_4

5. Use the token to run tests

You can run the tests via ./regression.py and provide the following parameters:

./regression.py --clickhouse https://altinity-build-artifacts.s3.amazonaws.com/PRs/920/7498a034ab5c1083a9394b79c1bbec8abb92250a/build_amd_release/clickhouse-common-static_25.6.5.1_amd64.deb --identity-provider azure --tenant-id <tenant_id> --client-id <client_id> --client-secret <client_secret>

For keycloak no parameters are required:

./regression.py --clickhouse https://altinity-build-artifacts.s3.amazonaws.com/PRs/920/7498a034ab5c1083a9394b79c1bbec8abb92250a/build_amd_release/clickhouse-common-static_25.6.5.1_amd64.deb --identity-provider keycloak