This repository was archived by the owner on Jun 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathconf.rst
1061 lines (868 loc) · 29 KB
/
conf.rst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
========================
Configuration directives
========================
------
issuer
------
The issuer ID of the OP, a unique value in URI format.
--------------
session params
--------------
Configuration parameters used by session manager::
"session_params": {
"password": "__password_used_to_encrypt_access_token_sid_value",
"salt": "salt involved in session sub hash ",
"sub_func": {
"public": {
"class": "oidcop.session.manager.PublicID",
"kwargs": {
"salt": "sdfsdfdsf"
}
},
"pairwise": {
"class": "oidcop.session.manager.PairWiseID",
"kwargs": {
"salt": "sdfsdfsdf"
}
}
}
},
password
########
Optional. Encryption key used to encrypt the SessionID (sid) in access_token.
If unset it will be random.
salt
####
Optional. Salt, value or filename, used in sub_funcs (pairwise, public) for creating the opaque hash of *sub* claim.
sub_funcs
#########
Optional. Functions involved in subject value creation.
scopes_to_claims
################
A dict defining the scopes that are allowed to be used per client and the claims
they map to (defaults to the scopes mapping described in the spec). If we want
to define a scope that doesn't map to claims (e.g. offline_access) then we
simply map it to an empty list. E.g.::
{
"scope_a": ["claim1", "claim2"],
"scope_b": []
}
*Note*: For OIDC the `openid` scope must be present in this mapping.
allowed_scopes
##############
A list with the scopes that are allowed to be used (defaults to the keys in scopes_to_claims).
scopes_supported
################
A list with the scopes that will be advertised in the well-known endpoint (defaults to allowed_scopes).
------
add_on
------
An example::
"add_on": {
"pkce": {
"function": "oidcop.oidc.add_on.pkce.add_pkce_support",
"kwargs": {
"essential": false,
"code_challenge_method": "S256 S384 S512"
}
},
}
The provided add-ons can be seen in the following sections.
pkce
####
The pkce add on is activated using the ``oidcop.oidc.add_on.pkce.add_pkce_support``
function. The possible configuration options can be found below.
essential
---------
Whether pkce is mandatory, authentication requests without a ``code_challenge``
will fail if this is True. This option can be overridden per client by defining
``pkce_essential`` in the client metadata.
code_challenge_method
---------------------
The allowed code_challenge methods. The supported code challenge methods are:
``plain, S256, S384, S512``
--------------
authentication
--------------
An example::
"authentication": {
"user": {
"acr": "urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword",
"class": "oidcop.user_authn.user.UserPassJinja2",
"kwargs": {
"verify_endpoint": "verify/user",
"template": "user_pass.jinja2",
"db": {
"class": "oidcop.util.JSONDictDB",
"kwargs": {
"filename": "passwd.json"
}
},
"page_header": "Testing log in",
"submit_btn": "Get me in!",
"user_label": "Nickname",
"passwd_label": "Secret sauce"
}
}
},
------------
capabilities
------------
This covers most of the basic functionality of the OP. The key words are the
same as defined in `OIDC Discovery <https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata>`_.
A couple of things are defined else where. Like the endpoints, issuer id,
jwks_uri and the authentication methods at the token endpoint.
An example::
response_types_supported:
- code
- token
- id_token
- "code token"
- "code id_token"
- "id_token token"
- "code id_token token"
- none
response_modes_supported:
- query
- fragment
- form_post
subject_types_supported:
- public
- pairwise
grant_types_supported:
- authorization_code
- implicit
- urn:ietf:params:oauth:grant-type:jwt-bearer
- refresh_token
- urn:ietf:params:oauth:grant-type:token-exchange
claim_types_supported:
- normal
- aggregated
- distributed
claims_parameter_supported: True
request_parameter_supported: True
request_uri_parameter_supported: True
frontchannel_logout_supported: True
frontchannel_logout_session_supported: True
backchannel_logout_supported: True
backchannel_logout_session_supported: True
check_session_iframe: https://127.0.0.1:5000/check_session_iframe
scopes_supported: ["openid", "profile", "random"]
claims_supported: ["sub", "given_name", "birthdate"]
---------
client_db
---------
If you're running an OP with static client registration you want to keep the
registered clients in a database separate from the session database since
it will change independent of the OP process. In this case you need *client_db*.
If you are on the other hand only allowing dynamic client registration then
keeping registered clients only in the session database makes total sense.
The class you reference in the specification MUST be a subclass of
oidcmsg.storage.DictType and have some of the methods a dictionary has.
Note also that this class MUST support the dump and load methods as defined
in :py:class:`oidcmsg.impexp.ImpExp`.
An example::
client_db: {
"class": 'oidcmsg.abfile.AbstractFileSystem',
"kwargs": {
'fdir': full_path("afs"),
'value_conv': 'oidcmsg.util.JSON'
}
}
--------------
cookie_handler
--------------
An example::
"cookie_handler": {
"class": "oidcop.cookie_handler.CookieHandler",
"kwargs": {
"keys": {
"private_path": f"{OIDC_JWKS_PRIVATE_PATH}/cookie_jwks.json",
"key_defs": [
{"type": "OCT", "use": ["enc"], "kid": "enc"},
{"type": "OCT", "use": ["sig"], "kid": "sig"}
],
"read_only": False
},
"flags": {
"samesite": "None",
"httponly": True,
"secure": True,
},
"name": {
"session": "oidc_op",
"register": "oidc_op_rp",
"session_management": "sman"
}
}
},
--------
endpoint
--------
An example::
"endpoint": {
"webfinger": {
"path": ".well-known/webfinger",
"class": "oidcop.oidc.discovery.Discovery",
"kwargs": {
"client_authn_method": null
}
},
"provider_info": {
"path": ".well-known/openid-configuration",
"class": "oidcop.oidc.provider_config.ProviderConfiguration",
"kwargs": {
"client_authn_method": null
}
},
"registration": {
"path": "registration",
"class": "oidcop.oidc.registration.Registration",
"kwargs": {
"client_authn_method": None,
"client_secret_expiration_time": 432000,
"client_id_generator": {
"class": 'oidcop.oidc.registration.random_client_id',
"kwargs": {
"seed": "that-optional-random-value"
}
}
}
},
"registration_api": {
"path": "registration_api",
"class": "oidcop.oidc.read_registration.RegistrationRead",
"kwargs": {
"client_authn_method": [
"bearer_header"
]
}
},
"introspection": {
"path": "introspection",
"class": "oidcop.oauth2.introspection.Introspection",
"kwargs": {
"client_authn_method": [
"client_secret_post",
"client_secret_basic",
"client_secret_jwt",
"private_key_jwt"
]
"release": [
"username"
]
}
},
"authorization": {
"path": "authorization",
"class": "oidcop.oidc.authorization.Authorization",
"kwargs": {
"client_authn_method": null,
"claims_parameter_supported": true,
"request_parameter_supported": true,
"request_uri_parameter_supported": true,
"response_types_supported": [
"code",
"token",
"id_token",
"code token",
"code id_token",
"id_token token",
"code id_token token",
"none"
],
"response_modes_supported": [
"query",
"fragment",
"form_post"
]
}
},
"token": {
"path": "token",
"class": "oidcop.oidc.token.Token",
"kwargs": {
"client_authn_method": [
"client_secret_post",
"client_secret_basic",
"client_secret_jwt",
"private_key_jwt",
],
"revoke_refresh_on_issue": True
}
},
"userinfo": {
"path": "userinfo",
"class": "oidcop.oidc.userinfo.UserInfo",
"kwargs": {
"claim_types_supported": [
"normal",
"aggregated",
"distributed"
]
}
},
"end_session": {
"path": "session",
"class": "oidcop.oidc.session.Session",
"kwargs": {
"logout_verify_url": "verify_logout",
"post_logout_uri_path": "post_logout",
"signing_alg": "ES256",
"frontchannel_logout_supported": true,
"frontchannel_logout_session_supported": true,
"backchannel_logout_supported": true,
"backchannel_logout_session_supported": true,
"check_session_iframe": "check_session_iframe"
}
}
}
You can specify which algoritms are supported, for example in userinfo_endpoint::
"userinfo_signing_alg_values_supported": OIDC_SIGN_ALGS,
"userinfo_encryption_alg_values_supported": OIDC_ENC_ALGS,
Or in authorization endpoint::
"request_object_encryption_alg_values_supported": OIDC_ENC_ALGS,
------------
httpc_params
------------
Parameters submitted to the web client (python requests).
In this case the TLS certificate will not be verified, to be intended exclusively for development purposes
Example ::
"httpc_params": {
"verify": false
},
----
keys
----
An example::
"keys": {
"private_path": "private/jwks.json",
"key_defs": [
{
"type": "RSA",
"use": [
"sig"
]
},
{
"type": "EC",
"crv": "P-256",
"use": [
"sig"
]
}
],
"public_path": "static/jwks.json",
"read_only": false,
"uri_path": "static/jwks.json"
},
*read_only* means that on each restart the keys will created and overwritten with new ones.
This can be useful during the first time the project have been executed, then to keep them as they are *read_only* would be configured to *True*.
---------------
login_hint2acrs
---------------
OIDC Login hint support, it's optional.
It matches the login_hint paramenter to one or more Authentication Contexts.
An example::
"login_hint2acrs": {
"class": "oidcop.login_hint.LoginHint2Acrs",
"kwargs": {
"scheme_map": {
"email": [
"urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword"
]
}
}
},
oidc-op supports the following authn contexts:
- UNSPECIFIED, urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified
- INTERNETPROTOCOLPASSWORD, urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword
- MOBILETWOFACTORCONTRACT, urn:oasis:names:tc:SAML:2.0:ac:classes:MobileTwoFactorContract
- PASSWORDPROTECTEDTRANSPORT, urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
- PASSWORD, urn:oasis:names:tc:SAML:2.0:ac:classes:Password
- TLSCLIENT, urn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient
- TIMESYNCTOKEN, urn:oasis:names:tc:SAML:2.0:ac:classes:TimeSyncToken
-----
authz
-----
This configuration section refers to the authorization/authentication endpoint behaviour.
Scopes bound to an access token are strictly related to grant management, as part of what that endpoint does.
Regarding grant authorization we should have something like the following example.
If you omit this section from the configuration (thus using some sort of default profile)
you'll have an Implicit grant authorization that leads granting nothing.
Add the below to your configuration and you'll see things changing.
An example::
"authz": {
"class": "oidcop.authz.AuthzHandling",
"kwargs": {
"grant_config": {
"usage_rules": {
"authorization_code": {
"supports_minting": ["access_token", "refresh_token", "id_token"],
"max_usage": 1
},
"access_token": {},
"refresh_token": {
"supports_minting": ["access_token", "refresh_token"]
}
},
"expires_in": 43200,
"audience": ['https://www.example.com']
}
}
},
------------
template_dir
------------
The HTML Template directory used by Jinja2, used by endpoint context
template loader, as::
Environment(loader=FileSystemLoader(template_dir), autoescape=True)
An example::
"template_dir": "templates"
For any further customization of template here an example of what used in django-oidc-op::
"authentication": {
"user": {
"acr": "urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword",
"class": "oidc_provider.users.UserPassDjango",
"kwargs": {
"verify_endpoint": "verify/oidc_user_login/",
"template": "oidc_login.html",
"page_header": "Testing log in",
"submit_btn": "Get me in!",
"user_label": "Nickname",
"passwd_label": "Secret sauce"
}
}
},
------------------
token_handler_args
------------------
Token handler is an intermediate interface used by and endpoint to manage
the tokens' default behaviour, like lifetime and minting policies.
With it we can create a token that's linked to another, and keep relations between many tokens
in session and grants management.
An example::
"token_handler_args": {
"jwks_def": {
"private_path": "private/token_jwks.json",
"read_only": false,
"key_defs": [
{
"type": "oct",
"bytes": 24,
"use": [
"enc"
],
"kid": "code"
},
{
"type": "oct",
"bytes": 24,
"use": [
"enc"
],
"kid": "refresh"
}
]
},
"code": {
"kwargs": {
"lifetime": 600
}
},
"token": {
"class": "oidcop.token.jwt_token.JWTToken",
"kwargs": {
"lifetime": 3600,
"add_claims": [
"email",
"email_verified",
"phone_number",
"phone_number_verified"
],
"add_claims_by_scope": true,
"aud": ["https://example.org/appl"]
}
},
"refresh": {
"kwargs": {
"lifetime": 86400
}
}
"id_token": {
"class": "oidcop.token.id_token.IDToken",
"kwargs": {
"base_claims": {
"email": None,
"email_verified": None,
},
}
}
jwks_defs can be replaced eventually by `jwks_file`::
"jwks_file": f"{OIDC_JWKS_PRIVATE_PATH}/token_jwks.json",
You can even select wich algorithms to support in id_token, eg::
"id_token": {
"class": "oidcop.token.id_token.IDToken",
"kwargs": {
"id_token_signing_alg_values_supported": [
"RS256",
"RS512",
"ES256",
"ES512",
"PS256",
"PS512",
],
"id_token_encryption_alg_values_supported": [
"RSA-OAEP",
"RSA-OAEP-256",
"A192KW",
"A256KW",
"ECDH-ES",
"ECDH-ES+A128KW",
"ECDH-ES+A192KW",
"ECDH-ES+A256KW",
],
"id_token_encryption_enc_values_supported": [
'A128CBC-HS256',
'A192CBC-HS384',
'A256CBC-HS512',
'A128GCM',
'A192GCM',
'A256GCM'
],
}
}
--------
userinfo
--------
An example::
"userinfo": {
"class": "oidcop.user_info.UserInfo",
"kwargs": {
"db_file": "users.json"
}
}
This is somethig that can be customized.
For example in the django-oidc-op implementation is used something like
the following::
"userinfo": {
"class": "oidc_provider.users.UserInfo",
"kwargs": {
"claims_map": {
"phone_number": "telephone",
"family_name": "last_name",
"given_name": "first_name",
"email": "email",
"verified_email": "email",
"gender": "gender",
"birthdate": "get_oidc_birthdate",
"updated_at": "get_oidc_lastlogin"
}
}
}
==============
Token exchange
==============
There are two possible ways to configure Token Exchange in OIDC-OP, globally and per-client.
For the first case the configuration is passed in the Token Exchange handler throught the
`urn:ietf:params:oauth:grant-type:token-exchange` dictionary in token's `grant_types_supported`.
If present, the token exchange configuration may contain a `policy` dictionary
that defines the behaviour for each subject token type. Each subject token type
is mapped to a dictionary with the keys `callable` (mandatory), which must be a
python callable or a string that represents the path to a python callable, and
`kwargs` (optional), which must be a dict of key-value arguments that will be
passed to the callable.
The key `""` represents a fallback policy that will be used if the subject token
type can't be found. If a subject token type is defined in the `policy` but is
not in the `subject_token_types_supported` list then it is ignored.
```
"grant_types_supported":{
"urn:ietf:params:oauth:grant-type:token-exchange": {
"class": "oidcop.oauth2.token.TokenExchangeHelper",
"kwargs": {
"subject_token_types_supported": [
"urn:ietf:params:oauth:token-type:access_token",
"urn:ietf:params:oauth:token-type:refresh_token",
"urn:ietf:params:oauth:token-type:id_token"
],
"requested_token_types_supported": [
"urn:ietf:params:oauth:token-type:access_token",
"urn:ietf:params:oauth:token-type:refresh_token",
"urn:ietf:params:oauth:token-type:id_token"
],
"policy": {
"urn:ietf:params:oauth:token-type:access_token": {
"callable": "/path/to/callable",
"kwargs": {
"audience": ["https://example.com"],
"scopes": ["openid"]
}
},
"urn:ietf:params:oauth:token-type:refresh_token": {
"callable": "/path/to/callable",
"kwargs": {
"resource": ["https://example.com"],
"scopes": ["openid"]
}
},
"": {
"callable": "/path/to/callable",
"kwargs": {
"scopes": ["openid"]
}
}
}
}
}
}
```
For the per-client configuration a similar configuration scheme should be present in the client's
metadata under the `token_exchange` key.
For example:
```
"token_exchange":{
"urn:ietf:params:oauth:grant-type:token-exchange": {
"class": "oidcop.oidc.token.TokenExchangeHelper",
"kwargs": {
"subject_token_types_supported": [
"urn:ietf:params:oauth:token-type:access_token",
"urn:ietf:params:oauth:token-type:refresh_token",
"urn:ietf:params:oauth:token-type:id_token"
],
"requested_token_types_supported": [
"urn:ietf:params:oauth:token-type:access_token",
"urn:ietf:params:oauth:token-type:refresh_token",
"urn:ietf:params:oauth:token-type:id_token"
],
"policy": {
"urn:ietf:params:oauth:token-type:access_token": {
"callable": "/path/to/callable",
"kwargs": {
"audience": ["https://example.com"],
"scopes": ["openid"]
}
},
"urn:ietf:params:oauth:token-type:refresh_token": {
"callable": "/path/to/callable",
"kwargs": {
"resource": ["https://example.com"],
"scopes": ["openid"]
}
},
"": {
"callable": "/path/to/callable",
"kwargs": {
"scopes": ["openid"]
}
}
}
}
}
}
```
The policy callable accepts a specific argument list and must return the altered token exchange
request or raise an exception.
For example:
```
def custom_token_exchange_policy(request, context, subject_token, **kwargs):
if some_condition in request:
return TokenErrorResponse(
error="invalid_request", error_description="Some error occured"
)
return request
```
=======
Clients
=======
In this section there are some client configuration examples. That can be used
to override the global configuration of the OP.
How to configure the release of the user claims per clients::
endpoint_context.cdb["client_1"] = {
"client_secret": "hemligt",
"redirect_uris": [("https://example.com/cb", None)],
"response_types": ["code", "token", "code id_token", "id_token"],
"add_claims": {
"always": {
"introspection": ["nickname", "eduperson_scoped_affiliation"],
"userinfo": ["picture", "phone_number"],
},
# this overload the general endpoint configuration for this client
# self.server.server_get("endpoint", "id_token").kwargs = {"add_claims_by_scope": True}
"by_scope": {
"id_token": False,
},
},
The available configuration options are:
-------------
client_secret
-------------
The client secret. This parameter is required.
------------------------
client_secret_expires_at
------------------------
When the client_secret expires.
-------------
redirect_uris
-------------
The client's redirect uris.
-----------
auth_method
-----------
The auth_method that can be used per endpoint.
E.g::
{
"AccessTokenRequest": "client_secret_basic",
...
}
------------
request_uris
------------
A list of `request_uris`.
See https://openid.net/specs/openid-connect-registration-1_0-29.html#ClientMetadata.
--------------
response_types
--------------
The allowed `response_types` for this client.
See https://openid.net/specs/openid-connect-registration-1_0-29.html#ClientMetadata.
---------------------
grant_types_supported
---------------------
Configure the allowed grant types on the token endpoint.
See https://openid.net/specs/openid-connect-registration-1_0-29.html#ClientMetadata.
----------------
scopes_to_claims
----------------
A dict defining the scopes that are allowed to be used per client and the claims
they map to (defaults to the scopes mapping described in the spec). If we want
to define a scope that doesn't map to claims (e.g. offline_access) then we
simply map it to an empty list. E.g.::
{
"scope_a": ["claim1", "claim2"],
"scope_b": []
}
--------------
allowed_scopes
--------------
A list with the scopes that are allowed to be used (defaults to the keys in the
clients scopes_to_claims).
-----------------------
revoke_refresh_on_issue
-----------------------
Configure whether to revoke the refresh token that was used to issue a new refresh token.
----------
add_claims
----------
A dictionary with the following keys
always
######
A dictionary with the following keys: `userinfo`, `id_token`, `introspection`, `access_token`.
The keys are used to describe the claims we want to add to the corresponding interface.
The keys can be a list of claims to be added or a dict in the format described
in https://openid.net/specs/openid-connect-core-1_0.html#IndividualClaimsRequests
E.g.::
{
"add_claims": {
"always": {
"userinfo": ["email", "phone"], # Always add "email" and "phone" in the userinfo response if such claims exists
"id_token": {"email": null}, # Always add "email" in the id_token if such a claim exists
"introspection": {"email": {"value": "[email protected]"}}, # Add "email" in the introspection response only if its value is "[email protected]"
}
}
}
by_scope
########
A dictionary with the following keys: `userinfo`, `id_token`, `introspection`, `access_token`.
The keys are boolean values that describe whether the scopes should be mapped
to claims and added to the response.
E.g.::
{
"add_claims": {
"by_scope": {
id_token: True, # Map the requested scopes to claims and add them to the id token
}
-----------------
token_usage_rules
-----------------
The usage rules for each token type. E.g.::
{
"usage_rules": {
"authorization_code": {
"expires_in": 3600,
"supports_minting": [
"access_token",
"id_token",
],
"max_usage": 1,
},
"access_token": {
"expires_in": self.params["access_token_lifetime"],
},
}
}
--------------
pkce_essential
--------------
Whether pkce is essential for this client.
------------------------
post_logout_redirect_uri
------------------------
The client's post logout redirect uris.
See https://openid.net/specs/openid-connect-rpinitiated-1_0.html#RPLogout.
----------------------
backchannel_logout_uri
----------------------
The client's `backchannel_logout_uri`.
See https://openid.net/specs/openid-connect-backchannel-1_0.html#BCRegistration
-----------------------
frontchannel_logout_uri
-----------------------
The client's `frontchannel_logout_uri`.
See https://openid.net/specs/openid-connect-frontchannel-1_0.html#RPLogout
--------------------------
request_object_signing_alg
--------------------------
A list with the allowed algorithms for signing the request object.
See https://openid.net/specs/openid-connect-registration-1_0-29.html#ClientMetadata
-----------------------------
request_object_encryption_alg
-----------------------------
A list with the allowed alg algorithms for encrypting the request object.