Skip to content

Commit

Permalink
refactor: update apple and microsoft config key names
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The following OpenID Connect configuration keys have been renamed to better explain their purpose:

```patch
- private_key_id
+ apple_private_key_id

- private_key
+ apple_private_key

- team_id
+ apple_team_id

- tenant
+ microsoft_tenant
```

Closes #1979
  • Loading branch information
aeneasr committed Feb 25, 2022
1 parent c5b444a commit 5840542
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
32 changes: 16 additions & 16 deletions embedx/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
]
}
},
"tenant": {
"microsoft_tenant": {
"title": "Azure AD Tenant",
"description": "The Azure AD Tenant to use for authentication.",
"type": "string",
Expand All @@ -396,23 +396,23 @@
"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",
"examples": [
"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",
"examples": [
"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",
Expand Down Expand Up @@ -445,16 +445,16 @@
},
"then": {
"required": [
"tenant"
"microsoft_tenant"
]
},
"else": {
"not": {
"properties": {
"tenant": {}
"microsoft_tenant": {}
},
"required": [
"tenant"
"microsoft_tenant"
]
}
}
Expand All @@ -480,9 +480,9 @@
]
},
"required": [
"private_key_id",
"private_key",
"team_id"
"apple_private_key_id",
"apple_private_key",
"apple_team_id"
]
},
"else": {
Expand All @@ -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"
]
}
}
Expand Down
10 changes: 5 additions & 5 deletions selfservice/strategy/oidc/provider_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ token_url: not an URL
mapper_url: not an URL
scope:
- 1
tenant: 1
microsoft_tenant: 1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ provider: github
client_id: asdf
client_secret: asdf
mapper_url: file://./mapper_file
tenant: org
microsoft_tenant: org
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ mapper_url: https://example.com
scope:
- foo
- bar
tenant: org
microsoft_tenant: org
requested_claims: "#/definitions/OIDCClaims"

0 comments on commit 5840542

Please sign in to comment.