Skip to content

Commit

Permalink
17411 saml: addition of RequestedAuthnContext option
Browse files Browse the repository at this point in the history
This werk introduces support for configuring the `<RequestedAuthnContext>`
in SAML authentication. In more deteail, it allows specifying authentication
requirements, including `AuthnContextClassRef` values and `Comparison`
attributes, to ensure greater control over the authentication process.

CMK-12024

Change-Id: I690897e8d70433800fd87186dd68cca2f543f5a0
  • Loading branch information
anthonyh209 committed Dec 3, 2024
1 parent d155d6f commit 1155104
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .werks/17411.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[//]: # (werk v2)
# saml: addition of RequestedAuthnContext option

key | value
---------- | ---
date | 2024-12-02T14:09:25+00:00
version | 2.4.0b1
class | feature
edition | cee
component | setup
level | 1
compatible | yes

This werk introduces support for configuring the `<RequestedAuthnContext>`
in SAML authentication. In more deteail, it allows specifying authentication
requirements, including `AuthnContextClassRef` values and `Comparison`
attributes, to ensure greater control over the authentication process.
6 changes: 6 additions & 0 deletions cmk/gui/userdb/_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ class ContactGroupMapping(TypedDict):
ROLE_MAPPING = Literal[False] | tuple[Literal[True], tuple[str, Mapping[str, Sequence[str]]]]


class SAMLRequestedAuthnContext(TypedDict):
comparison: Literal["exact", "minimum", "maximum", "better"]
authn_context_class_ref: Sequence[str]


class SAMLUserConnectionConfig(UserConnectionConfig, total=True):
name: str
description: str
Expand All @@ -177,6 +182,7 @@ class SAMLUserConnectionConfig(UserConnectionConfig, total=True):
connection_timeout: tuple[int, int] # connection timeout, read timeout
signature_certificate: SerializedCertificateSpec
encryption_certificate: NotRequired[SerializedCertificateSpec]
requested_authn_context: NotRequired[SAMLRequestedAuthnContext]
user_id_attribute_name: str
user_alias_attribute_name: str
email_attribute_name: str
Expand Down

0 comments on commit 1155104

Please sign in to comment.