@@ -8,24 +8,60 @@ import "google/protobuf/timestamp.proto";
8
8
9
9
import "gitpod/experimental/v1/pagination.proto" ;
10
10
11
+
12
+ // Configuration of an OpenID client.
13
+ //
14
+ // For the metadata describing the configuration of OIDC providers, cf.
15
+ // https://openid.net/specs/openid-connect-discovery-1_0.html
16
+ message OIDCClientConfig {
17
+ // ID is the unique identifier for the OIDC Config.
18
+ // Read only.
19
+ string id = 1 ;
20
+
21
+ OIDCConfig oidc_config = 2 ;
22
+
23
+ OAuth2Config oauth2_config = 3 ;
24
+ // Optional.
25
+ bool oauth_only = 4 ;
26
+
27
+ // List of the JWS signing algorithms (alg values) supported by the OP for the
28
+ // ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be
29
+ // included.
30
+ // Optional.
31
+ repeated string id_token_signing_alg_values_supported = 5 ;
32
+
33
+ // Time when the config was created.
34
+ // Read-only.
35
+ google.protobuf.Timestamp creation_time = 6 ;
36
+
37
+ // Describes the status of this configuration item.
38
+ // Read-only.
39
+ OIDCClientConfigStatus status = 7 ;
40
+ }
41
+
42
+ // The OIDC specific part of the client configuration.
11
43
message OIDCConfig {
12
44
// URL using the https scheme with no query or fragment component that the
13
- // OIDC provider asserts as its Issuer Identifier. Required.
45
+ // OIDC provider asserts as its Issuer Identifier.
46
+ // Required.
14
47
string issuer = 1 ;
15
48
16
49
// A KeySet that can validate the id_token (JSON web token)
17
50
// Either one is required.
18
51
string jwks = 2 ;
19
52
string jwks_url = 3 ;
20
53
54
+ // Provider specific parameters to control the behavior of the consent screen.
21
55
// Optional.
22
56
ConsentScreenHints hints = 4 ;
23
57
24
- // If set, the default claim mapping is overriden.
58
+ // Optional overrides for key mapping to be applied when extracting claims from id_tokens.
59
+ // Should only be set, if an override is required.
25
60
// Optional.
26
61
ClaimMappingOverride override_claim_mapping = 5 ;
27
62
}
28
63
64
+ // Provider specific parameters to control the behavior of the consent screen.
29
65
message ConsentScreenHints {
30
66
// Control options for the consent screen.
31
67
// Optional.
@@ -37,6 +73,7 @@ message ConsentScreenHints {
37
73
string login_hint = 3 ;
38
74
}
39
75
76
+ // Optional overrides for key mapping to be applied when extracting claims from id_tokens.
40
77
message ClaimMappingOverride {
41
78
// Optional.
42
79
string claim_email_key = 1 ;
@@ -46,10 +83,12 @@ message ClaimMappingOverride {
46
83
string claim_username_key = 3 ;
47
84
}
48
85
86
+ // The OAuth2 specific part of the client configuration.
49
87
message OAuth2Config {
50
88
// Required.
51
89
string client_id = 1 ;
52
- // Required.
90
+ // Required for creation/updates.
91
+ // Empty on read.
53
92
string client_secret = 2 ;
54
93
// Required.
55
94
string authorization_endpoint = 3 ;
@@ -59,52 +98,29 @@ message OAuth2Config {
59
98
repeated string scopes_supported = 5 ;
60
99
61
100
// Source for additional claims for the token.
101
+ // Additional keys may be used to control the extraction of a profile.
62
102
// Required.
63
103
string userinfo_endpoint = 6 ;
64
104
105
+ // Keys of the userinfo result to extract a profile from.
65
106
// Optional.
66
107
UserInfoKeys userinfo_keys = 7 ;
67
108
}
68
109
110
+ // Description of keys of a userinfo result.
69
111
message UserInfoKeys {
70
112
// Optional.
71
113
string userinfo_id_key = 1 ;
72
114
// Optional.
73
115
string userinfo_name_key = 2 ;
74
116
}
75
117
76
- // Configuration of an OpenID provider instance.
77
- //
78
- // For the metadata describing the configuration of OIDC providers, cf.
79
- // https://openid.net/specs/openid-connect-discovery-1_0.html
80
- message OIDCClientConfig {
81
- // ID is the unique identifier for the OIDC Config.
82
- // Read only.
83
- string id = 1 ;
84
-
85
- OIDCConfig oidc_config = 2 ;
86
-
87
- OAuth2Config oauth2_config = 3 ;
88
- // Optional.
89
- bool oauth_only = 4 ;
90
-
91
- // List of the JWS signing algorithms (alg values) supported by the OP for the
92
- // ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be
93
- // included. Optional.
94
- repeated string id_token_signing_alg_values_supported = 5 ;
95
-
96
- // Time when the config was created.
97
- // Read-only.
98
- google.protobuf.Timestamp creation_time = 6 ;
99
-
100
- // Read-only.
101
- OIDCClientStatus status = 7 ;
102
- }
103
-
104
- message OIDCClientStatus {
118
+ // The status of an OIDC client configuration.
119
+ message OIDCClientConfigStatus {
105
120
//
106
121
}
107
122
123
+
108
124
service OIDCService {
109
125
// Creates a new OIDC client configuration.
110
126
rpc CreateClientConfig (CreateClientConfigRequest )
@@ -118,11 +134,11 @@ service OIDCService {
118
134
rpc ListClientConfigs (ListClientConfigsRequest )
119
135
returns (ListClientConfigsResponse ) {};
120
136
121
- // Updates modifiable properties of an existing OIDC provider configuration.
137
+ // Updates modifiable properties of an existing OIDC client configuration.
122
138
rpc UpdateClientConfig (UpdateClientConfigRequest )
123
139
returns (UpdateClientConfigResponse ) {};
124
140
125
- // Removes a OIDC provider configuration by ID.
141
+ // Removes a OIDC client configuration by ID.
126
142
rpc DeleteClientConfig (DeleteClientConfigRequest )
127
143
returns (DeleteClientConfigResponse ) {};
128
144
}
0 commit comments