website/docs: add skip object instructions (#13749)
* Beginning of work * Added instructions for skipobject to each source * removed saml * removed oauth * Updates * Added provider SkipObject instructions * combined examples into one * modified kerberos python snippet as per suggestion from Marc * Update website/docs/add-secure-apps/providers/property-mappings/index.md Co-authored-by: Dominic R <dominic@sdko.org> Signed-off-by: Dewi Roberts <dewi@goauthentik.io> * Update website/docs/users-sources/sources/protocols/kerberos/index.md Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: Dewi Roberts <dewi@goauthentik.io> * Clarified how to use the exception * Update website/docs/add-secure-apps/providers/property-mappings/index.md Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: Dewi Roberts <dewi@goauthentik.io> * Update website/docs/add-secure-apps/providers/property-mappings/index.md Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: Dewi Roberts <dewi@goauthentik.io> * fixed missing ) after gws Signed-off-by: Dewi Roberts <dewi@goauthentik.io> * fixed missing . from /scim Signed-off-by: Dewi Roberts <dewi@goauthentik.io> * fixing broken links Signed-off-by: Dewi Roberts <dewi@goauthentik.io> * Fixed links Signed-off-by: Dewi Roberts <dewi@goauthentik.io> --------- Signed-off-by: Dewi Roberts <dewi@goauthentik.io> Co-authored-by: Dominic R <dominic@sdko.org> Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
This commit is contained in:
@ -11,3 +11,14 @@ SAML property mappings allow you embed information into the SAML authentication
|
||||
## Scope mappings
|
||||
|
||||
Scope mappings are used by the OAuth2 provider to map information from authentik to OAuth2/OpenID claims. Values returned by a scope mapping are added as custom claims to access and ID tokens.
|
||||
|
||||
## Skip objects during synchronization
|
||||
|
||||
To skip synchronization for a specific object, you can create a property mapping with an expression that triggers the `SkipObject` exception. This functionality is supported by the following providers: [**Google Workspace**](../gws/), [**Microsoft Entra ID**](../entra/), and [**SCIM**](../scim/).
|
||||
|
||||
**Example:**
|
||||
|
||||
```python
|
||||
if request.user.username == "example_username":
|
||||
raise SkipObject
|
||||
```
|
||||
|
@ -139,6 +139,18 @@ When the property mapping is invoked from a synchronization context, the followi
|
||||
|
||||
- `principal_obj`: a [`Principal`](https://kadmin-rs.readthedocs.io/latest/kadmin.html#kadmin.Principal) object retrieved from the KAdmin API
|
||||
|
||||
### Additional expression semantics
|
||||
|
||||
If you need to skip synchronization for a specific object, you can raise the `SkipObject` exception. To do so, create or modify a Kerberos property mapping to use an expression to define the object to skip.
|
||||
|
||||
**Example:**
|
||||
|
||||
```python
|
||||
localpart, realm = principal.rsplit("@", 1)
|
||||
if localpart == "username":
|
||||
raise SkipObject
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
You can start authentik with the `KRB5_TRACE=/dev/stderr` environment variable for Kerberos to print errors in the logs.
|
||||
|
@ -110,7 +110,9 @@ The following variables are available to LDAP source property mappings:
|
||||
|
||||
### Additional expression semantics
|
||||
|
||||
If you need to skip synchronization for a specific object, you can raise the `SkipObject` exception:
|
||||
If you need to skip synchronization for a specific object, you can raise the `SkipObject` exception. To do so, create or modify a LDAP property mapping to use an expression to define the object to skip.
|
||||
|
||||
**Example:**
|
||||
|
||||
```python
|
||||
if ldap.get("cn") == "doNotSync":
|
||||
|
Reference in New Issue
Block a user