You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Introduction:

This feature enables CloudStack administrators to configure domain-specific OAuth2 providers. In multi-tenant environments, each domain (representing a customer, department, or team) can have its own OAuth2 provider configuration. This allows organizations to maintain separate OAuth credentials per domain, ensuring users authenticate against the correct identity provider for their team.

Scope:

  • Register OAuth providers for specific domains
  • Authenticate users using domain-specific provider credentials
  • Domain-level oauth2.enabled setting to control OAuth availability per domain
  • Error handling - duplicate provider rejection, provider not found, OAuth disabled for domain

API Changes:

registerOAuthProvider

New parameter:

  • domainid: optional UUID parameter to register the OAuth provider for a specific domain. If not provided, the provider is registered at the global level.

listOAuthProviders

New parameter:

  • domainid: optional UUID parameter to filter providers by domain. When specified, returns providers for that domain plus global providers. Use -1 to list only global providers.

New response field:

  • domainid: indicates the domain association of the provider (null for global).

verifyOAuthCodeAndGetUser

New parameters:

  • domainid: optional UUID parameter to lookup provider for a specific domain.
  • domain: optional string parameter to lookup provider by domain path (e.g., /ROOT/Engineering).

If both are provided, domainid takes precedence.

oauthlogin

No new parameters. Existing domain and domainid parameters are now also used to determine which OAuth provider credentials to use during authentication.


CloudMonkey (cmk) Examples:

Register domain-specific OAuth provider:


cmk register oauthprovider \
    provider=github \
    description="Engineering GitHub" \
    clientid="Iv1.abc123" \
    secretkey="secret456" \
    redirecturi="https://cloudstack.example.com/client/oauth2" \
    domainid=<domain-uuid>

List providers for a domain:


cmk list oauthproviders domainid=<domain-uuid>

List only global providers





  • No labels