-
-
Notifications
You must be signed in to change notification settings - Fork 891
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to blueprints property mappings, improvements to frontend
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
- Loading branch information
Showing
10 changed files
with
203 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
version: 1 | ||
metadata: | ||
labels: | ||
blueprints.goauthentik.io/system: "true" | ||
name: System - Kerberos Source - Mappings | ||
entries: | ||
- identifiers: | ||
managed: goauthentik.io/sources/kerberos/user/default/multipart-principals-as-service-accounts | ||
model: authentik_sources_kerberos.kerberossourcepropertymapping | ||
attrs: | ||
name: "authentik default Kerberos User Mapping: Multipart principals as service accounts" | ||
expression: | | ||
from authentik.core.models import USER_PATH_SERVICE_ACCOUNT, UserTypes | ||
localpart, _ = principal.rsplit("@", 1) | ||
is_service_account = "/" in localpart | ||
attrs = {} | ||
if is_service_account: | ||
attrs = { | ||
"type": UserTypes.SERVICE_ACCOUNT, | ||
"path": USER_PATH_SERVICE_ACCOUNT, | ||
} | ||
return attrs | ||
- identifiers: | ||
managed: goauthentik.io/sources/kerberos/user/default/realm-as-group | ||
model: authentik_sources_kerberos.kerberossourcepropertymapping | ||
attrs: | ||
name: "authentik default Kerberos User Mapping: Add realm as group" | ||
expression: | | ||
localpart, realm = principal.rsplit("@", 1) | ||
return { | ||
"groups": [realm.upper()] | ||
} | ||
- identifiers: | ||
managed: goauthentik.io/sources/kerberos/user/default/ignore-other-realms | ||
model: authentik_sources_kerberos.kerberossourcepropertymapping | ||
attrs: | ||
name: "authentik default Kerberos User Mapping: Ignore other realms" | ||
expression: | | ||
localpart, realm = principal.rsplit("@", 1) | ||
attrs = {} | ||
if realm.upper() != source.realm.upper(): | ||
attrs["username"] = None | ||
return attrs | ||
- identifiers: | ||
managed: goauthentik.io/sources/kerberos/user/default/ignore-system-principals | ||
model: authentik_sources_kerberos.kerberossourcepropertymapping | ||
attrs: | ||
name: "authentik default Kerberos User Mapping: Ignore system principals" | ||
expression: | | ||
localpart, realm = principal.rsplit("@", 1) | ||
attrs = {} | ||
denied_prefixes = ["kadmin/", "krbtgt/", "K/M", "WELLKNOWN/"] | ||
for prefix in denied_prefixes: | ||
if localpart.lower().startswith(prefix.lower()): | ||
attrs["username"] = None | ||
break | ||
return attrs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.