diff --git a/embedx/config.schema.json b/embedx/config.schema.json index 0f3674dd358a..42bdcabf9656 100644 --- a/embedx/config.schema.json +++ b/embedx/config.schema.json @@ -384,7 +384,7 @@ ] } }, - "tenant": { + "microsoft_tenant": { "title": "Azure AD Tenant", "description": "The Azure AD Tenant to use for authentication.", "type": "string", @@ -396,7 +396,7 @@ "contoso.onmicrosoft.com" ] }, - "team_id": { + "apple_team_id": { "title": "Apple Developer Team ID", "description": "Apple Developer Team ID needed for generating a JWT token for client secret", "type": "string", @@ -404,7 +404,7 @@ "KP76DQS54M" ] }, - "private_key_id": { + "apple_private_key_id": { "title": "Apple Private Key Identifier", "description": "Sign In with Apple Private Key Identifier needed for generating a JWT token for client secret", "type": "string", @@ -412,7 +412,7 @@ "UX56C66723" ] }, - "private_key": { + "apple_private_key": { "title": "Apple Private Key", "description": "Sign In with Apple Private Key needed for generating a JWT token for client secret", "type": "string", @@ -445,16 +445,16 @@ }, "then": { "required": [ - "tenant" + "microsoft_tenant" ] }, "else": { "not": { "properties": { - "tenant": {} + "microsoft_tenant": {} }, "required": [ - "tenant" + "microsoft_tenant" ] } } @@ -480,9 +480,9 @@ ] }, "required": [ - "private_key_id", - "private_key", - "team_id" + "apple_private_key_id", + "apple_private_key", + "apple_team_id" ] }, "else": { @@ -493,30 +493,30 @@ { "not": { "properties": { - "team_id": {} + "apple_team_id": {} }, "required": [ - "team_id" + "apple_team_id" ] } }, { "not": { "properties": { - "private_key_id": {} + "apple_private_key_id": {} }, "required": [ - "private_key_id" + "apple_private_key_id" ] } }, { "not": { "properties": { - "private_key": {} + "apple_private_key": {} }, "required": [ - "private_key" + "apple_private_key" ] } } diff --git a/selfservice/strategy/oidc/provider_config.go b/selfservice/strategy/oidc/provider_config.go index 06cf7c8cfa5a..1be21306594b 100644 --- a/selfservice/strategy/oidc/provider_config.go +++ b/selfservice/strategy/oidc/provider_config.go @@ -57,21 +57,21 @@ type Configuration struct { // Tenant is the Azure AD Tenant to use for authentication, and must be set when `provider` is set to `microsoft`. // Can be either `common`, `organizations`, `consumers` for a multitenant application or a specific tenant like // `8eaef023-2b34-4da1-9baa-8bc8c9d6a490` or `contoso.onmicrosoft.com`. - Tenant string `json:"tenant"` + Tenant string `json:"microsoft_tenant"` // TeamId is the Apple Developer Team ID that's needed for the `apple` `provider` to work. - // It can be found Apple Developer website and combined with `private_key` and `private_key_id` + // It can be found Apple Developer website and combined with `apple_private_key` and `apple_private_key_id` // is used to generate `client_secret` - TeamId string `json:"team_id"` + TeamId string `json:"apple_team_id"` // PrivateKeyId is the private Apple key identifier. Keys can be generated via developer.apple.com. // This key should be generated with the `Sign In with Apple` option checked. // This is needed when `provider` is set to `apple` - PrivateKeyId string `json:"private_key_id"` + PrivateKeyId string `json:"apple_private_key_id"` // PrivateKeyId is the Apple private key identifier that can be downloaded during key generation. // This is needed when `provider` is set to `apple` - PrivateKey string `json:"private_key"` + PrivateKey string `json:"apple_private_key"` // Scope specifies optional requested permissions. Scope []string `json:"scope"` diff --git a/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.invalidTypes.yaml b/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.invalidTypes.yaml index 2c2523f4f99f..b8c6fd9cf3b4 100644 --- a/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.invalidTypes.yaml +++ b/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.invalidTypes.yaml @@ -8,4 +8,4 @@ token_url: not an URL mapper_url: not an URL scope: - 1 -tenant: 1 +microsoft_tenant: 1 diff --git a/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.privateKeyIdNotWithGithub.yaml b/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.privateKeyIdNotWithGithub.yaml index 2ad225399cc7..6c9bc69d0b95 100644 --- a/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.privateKeyIdNotWithGithub.yaml +++ b/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.privateKeyIdNotWithGithub.yaml @@ -3,4 +3,4 @@ provider: github client_id: asdf client_secret: asdf mapper_url: file://./mapper_file -private_key_id: org +apple_private_key_id: org diff --git a/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.privateKeyRequiredWithApple.yaml b/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.privateKeyRequiredWithApple.yaml index cc92c02e6e2b..6110617cacea 100644 --- a/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.privateKeyRequiredWithApple.yaml +++ b/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.privateKeyRequiredWithApple.yaml @@ -1,8 +1,8 @@ id: foo provider: apple client_id: foo -team_id: foo -private_key_id: foo +apple_team_id: foo +apple_private_key_id: foo mapper_url: https://example.com scope: - foo diff --git a/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.teamIdRequiredWithApple.yaml b/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.teamIdRequiredWithApple.yaml index 898aae818618..eef15c378691 100644 --- a/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.teamIdRequiredWithApple.yaml +++ b/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.teamIdRequiredWithApple.yaml @@ -1,8 +1,8 @@ id: foo provider: apple client_id: foo -private_key_id: foo -private_key: foo +apple_private_key_id: foo +apple_private_key: foo mapper_url: https://example.com scope: - foo diff --git a/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.tenantNotWithGithub.yaml b/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.tenantNotWithGithub.yaml index a7c622381f15..8f6157779c90 100644 --- a/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.tenantNotWithGithub.yaml +++ b/test/schema/fixtures/config.schema.test.failure/selfServiceOIDCProvider.tenantNotWithGithub.yaml @@ -3,4 +3,4 @@ provider: github client_id: asdf client_secret: asdf mapper_url: file://./mapper_file -tenant: org +microsoft_tenant: org diff --git a/test/schema/fixtures/config.schema.test.success/selfServiceOIDCProvider.fullApple.yaml b/test/schema/fixtures/config.schema.test.success/selfServiceOIDCProvider.fullApple.yaml index 5c0d87107702..1f0ee5f27665 100644 --- a/test/schema/fixtures/config.schema.test.success/selfServiceOIDCProvider.fullApple.yaml +++ b/test/schema/fixtures/config.schema.test.success/selfServiceOIDCProvider.fullApple.yaml @@ -1,9 +1,9 @@ id: foo provider: apple client_id: foo -team_id: foo -private_key_id: foo -private_key: foo +apple_team_id: foo +apple_private_key_id: foo +apple_private_key: foo mapper_url: https://example.com scope: - foo diff --git a/test/schema/fixtures/config.schema.test.success/selfServiceOIDCProvider.fullMicrosoft.yaml b/test/schema/fixtures/config.schema.test.success/selfServiceOIDCProvider.fullMicrosoft.yaml index 5de4b1dccc8c..d17290f58bf9 100644 --- a/test/schema/fixtures/config.schema.test.success/selfServiceOIDCProvider.fullMicrosoft.yaml +++ b/test/schema/fixtures/config.schema.test.success/selfServiceOIDCProvider.fullMicrosoft.yaml @@ -9,5 +9,5 @@ mapper_url: https://example.com scope: - foo - bar -tenant: org +microsoft_tenant: org requested_claims: "#/definitions/OIDCClaims"