@@ -517,39 +517,47 @@ policy
517
517
""""""
518
518
519
519
If the server is an IdP and/or an AA, then there might be reasons to do things
520
- differently depending on who is asking; this is where that is specified.
521
- The keys are 'default' and SP entity identifiers. Default is used whenever
522
- there is no entry for a specific SP. The reasoning is also that if there is
523
- no default and only SP entity identifiers as keys, then the server will only
524
- accept connections from the specified SPs.
520
+ differently depending on who is asking (which is the requesting service); the
521
+ policy is where this behaviour is specified.
522
+
523
+ The keys are SP entity identifiers, Registration Authority names, or 'default'.
524
+ First, the policy for the requesting service is looked up using the SP entityID.
525
+ If no such policy is found, and if the SP metadata includes a Registration
526
+ Authority then a policy for the registration authority is looked up using the
527
+ Registration Authority name. If no policy is found, then the 'default' is looked
528
+ up. If there is no default and only SP entity identifiers as keys, then the
529
+ server will only accept connections from the specified SPs.
530
+
525
531
An example might be::
526
532
527
533
"service": {
528
534
"idp": {
529
535
"policy": {
530
- "default": {
531
- "lifetime": {"minutes":15},
532
- "attribute_restrictions": None, # means all I have
533
- "name_form": "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
534
- "entity_categories": ["edugain"]
535
- },
536
+ # a policy for a service
536
537
"urn:mace:example.com:saml:roland:sp": {
537
538
"lifetime": {"minutes": 5},
538
539
"attribute_restrictions": {
539
540
"givenName": None,
540
541
"surName": None,
541
542
},
542
543
},
543
- "registration_authorities": {
544
- "default" {
545
- "attribute_restrictions": None
544
+
545
+ # a policy for a registration authority
546
+ "http://www.swamid.se/": {
547
+ "attribute_restrictions": {
548
+ "givenName": None,
546
549
},
547
- "http://www.swamid.se/": {
548
- "attribute_restrictions": {
549
- "givenName": None,
550
- }
551
- }
552
- }
550
+ },
551
+
552
+ # the policy for all other services
553
+ "default": {
554
+ "lifetime": {"minutes":15},
555
+ "attribute_restrictions": None, # means all I have
556
+ "name_form": "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
557
+ "entity_categories": [
558
+ "edugain",
559
+ ],
560
+ },
553
561
}
554
562
}
555
563
}
@@ -573,11 +581,12 @@ An example might be::
573
581
the friendly name, and the saml attribute name will be taken from the uri/oid
574
582
defined in the attribute map.
575
583
*nameid_format *
576
- Which nameid format that should be used. Defaults to urn:oasis: names:tc: SAML:2.0:nameid-format: transient.
584
+ Which nameid format that should be used. Defaults to
585
+ `urn:oasis:names:tc:SAML:2.0:nameid-format:transient `.
577
586
*entity_categories *
578
587
Entity categories to apply.
579
588
*sign *
580
- Possible choices: "sign": [" response", "assertion", "on_demand"]
589
+ Possible choices: "response", "assertion", "on_demand"
581
590
582
591
If restrictions on values are deemed necessary, those are represented by
583
592
regular expressions.::
0 commit comments