blueprints: fix blueprint importer logging potentially sensitive data (#6567)

This commit is contained in:
Jens L 2023-08-18 00:33:26 +01:00 committed by GitHub
parent 811ff04ae0
commit 42c21da8b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -35,6 +35,7 @@ from authentik.core.models import (
Source, Source,
UserSourceConnection, UserSourceConnection,
) )
from authentik.events.utils import cleanse_dict
from authentik.flows.models import FlowToken, Stage from authentik.flows.models import FlowToken, Stage
from authentik.lib.models import SerializerModel from authentik.lib.models import SerializerModel
from authentik.outposts.models import OutpostServiceConnection from authentik.outposts.models import OutpostServiceConnection
@ -209,7 +210,9 @@ class Importer:
serializer_kwargs["partial"] = True serializer_kwargs["partial"] = True
else: else:
self.logger.debug( self.logger.debug(
"initialised new serializer instance", model=model, **updated_identifiers "initialised new serializer instance",
model=model,
**cleanse_dict(updated_identifiers),
) )
model_instance = model() model_instance = model()
# pk needs to be set on the model instance otherwise a new one will be generated # pk needs to be set on the model instance otherwise a new one will be generated

View File

@ -39,8 +39,9 @@ entries:
identifier: authentik-bootstrap-token identifier: authentik-bootstrap-token
intent: api intent: api
expiring: false expiring: false
key: !Context token
user: !KeyOf admin-user user: !KeyOf admin-user
attrs:
key: !Context token
- model: authentik_blueprints.blueprintinstance - model: authentik_blueprints.blueprintinstance
identifiers: identifiers:
metadata: metadata: