fix: use of generic oauth provider (#5345)

Adds a id_attribute to the GenericOAuthProvider, which is used to map the external User. Further mapping can be done in actions by using the `rawInfo` of the new `ctx.v1.providerInfo` field.
This commit is contained in:
Livio Spring
2023-03-03 11:38:49 +01:00
committed by GitHub
parent cfe00ef0d0
commit 2efa305e10
28 changed files with 456 additions and 98 deletions

View File

@@ -4343,7 +4343,9 @@ message AddGenericOAuthProviderRequest {
string token_endpoint = 5 [(validate.rules).string = {min_len: 1, max_len: 200}];
string user_endpoint = 6 [(validate.rules).string = {min_len: 1, max_len: 200}];
repeated string scopes = 7 [(validate.rules).repeated = {max_items: 20, items: {string: {min_len: 1, max_len: 100}}}];
zitadel.idp.v1.Options provider_options = 8;
// identifying attribute of the user in the response of the user_endpoint
string id_attribute = 8 [(validate.rules).string = {min_len: 1, max_len: 200}];
zitadel.idp.v1.Options provider_options = 9;
}
message AddGenericOAuthProviderResponse {
@@ -4361,7 +4363,9 @@ message UpdateGenericOAuthProviderRequest {
string token_endpoint = 6 [(validate.rules).string = {min_len: 1, max_len: 200}];
string user_endpoint = 7 [(validate.rules).string = {min_len: 1, max_len: 200}];
repeated string scopes = 8 [(validate.rules).repeated = {max_items: 20, items: {string: {min_len: 1, max_len: 100}}}];
zitadel.idp.v1.Options provider_options = 9;
// identifying attribute of the user in the response of the user_endpoint
string id_attribute = 9 [(validate.rules).string = {min_len: 1, max_len: 200}];
zitadel.idp.v1.Options provider_options = 10;
}
message UpdateGenericOAuthProviderResponse {

View File

@@ -275,6 +275,7 @@ message OAuthConfig {
string token_endpoint = 3;
string user_endpoint = 4;
repeated string scopes = 5;
string id_attribute = 6;
}
message GenericOIDCConfig {

View File

@@ -11017,7 +11017,9 @@ message AddGenericOAuthProviderRequest {
string token_endpoint = 5 [(validate.rules).string = {min_len: 1, max_len: 200}];
string user_endpoint = 6 [(validate.rules).string = {min_len: 1, max_len: 200}];
repeated string scopes = 7 [(validate.rules).repeated = {max_items: 20, items: {string: {min_len: 1, max_len: 100}}}];
zitadel.idp.v1.Options provider_options = 8;
// identifying attribute of the user in the response of the user_endpoint
string id_attribute = 8 [(validate.rules).string = {min_len: 1, max_len: 200}];
zitadel.idp.v1.Options provider_options = 9;
}
message AddGenericOAuthProviderResponse {
@@ -11035,7 +11037,9 @@ message UpdateGenericOAuthProviderRequest {
string token_endpoint = 6 [(validate.rules).string = {min_len: 1, max_len: 200}];
string user_endpoint = 7 [(validate.rules).string = {min_len: 1, max_len: 200}];
repeated string scopes = 8 [(validate.rules).repeated = {max_items: 20, items: {string: {min_len: 1, max_len: 100}}}];
zitadel.idp.v1.Options provider_options = 9;
// identifying attribute of the user in the response of the user_endpoint
string id_attribute = 9 [(validate.rules).string = {min_len: 1, max_len: 200}];
zitadel.idp.v1.Options provider_options = 10;
}
message UpdateGenericOAuthProviderResponse {