goauthentik / authentik

The authentication glue you need.
https://goauthentik.io
Other
13.74k stars 922 forks source link

SCIM Group Delete is not synced #10937

Open Ednn0nd1au opened 3 months ago

Ednn0nd1au commented 3 months ago

Describe the bug The delete function of Provisioned Groups under "SCIM Provider" is just delete the group fron the future provision list, but will not delete this group from application side.

Only delete function in group can result in application side group deletion.

Version and Deployment (please complete the following information):

Ednn0nd1au commented 3 months ago

and the api "/providers/scim_groups/{id}/" only delete information shown on Authentik but not also sending delete request to scim app.

Ednn0nd1au commented 3 months ago

after deletion manually from application side and Authentik "provisioned groups", the new actions can be sent to application, however sync status reported error

Traceback (most recent call last):
  File \"/ak-root/venv/lib/python3.12/site-packages/celery/app/trace.py\", line 453, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File \"/ak-root/venv/lib/python3.12/site-packages/sentry_sdk/utils.py\", line 1711, in runner
    return sentry_patched_function(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/ak-root/venv/lib/python3.12/site-packages/sentry_sdk/integrations/celery/__init__.py\", line 380, in _inner
    reraise(*exc_info)
  File \"/ak-root/venv/lib/python3.12/site-packages/sentry_sdk/utils.py\", line 1640, in reraise
    raise value
  File \"/ak-root/venv/lib/python3.12/site-packages/sentry_sdk/integrations/celery/__init__.py\", line 375, in _inner
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File \"/ak-root/venv/lib/python3.12/site-packages/celery/app/trace.py\", line 736, in __protected_call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/ak-root/venv/lib/python3.12/site-packages/celery/app/autoretry.py\", line 38, in run
    return task._orig_run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/authentik/providers/scim/tasks.py\", line 22, in scim_sync
    return sync_tasks.sync_single(self, provider_pk, scim_sync_objects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/authentik/lib/sync/outgoing/tasks.py\", line 98, in sync_single
    ).get():
      ^^^^^
  File \"/ak-root/venv/lib/python3.12/site-packages/celery/result.py\", line 251, in get
    return self.backend.wait_for_pending(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/ak-root/venv/lib/python3.12/site-packages/celery/backends/asynchronous.py\", line 223, in wait_for_pending
    return result.maybe_throw(callback=callback, propagate=propagate)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/ak-root/venv/lib/python3.12/site-packages/celery/result.py\", line 365, in maybe_throw
    self.throw(value, self._to_remote_traceback(tb))
  File \"/ak-root/venv/lib/python3.12/site-packages/celery/result.py\", line 358, in throw
    self.on_ready.throw(*args, **kwargs)
  File \"/ak-root/venv/lib/python3.12/site-packages/vine/promises.py\", line 235, in throw
    reraise(type(exc), exc, tb)
  File \"/ak-root/venv/lib/python3.12/site-packages/vine/utils.py\", line 27, in reraise
    raise value
builtins.Exception: \u003Cclass 'requests.exceptions.JSONDecodeError'\u003E(['Expecting value: line 1 column 1 (char 0)'])
authentik-automation[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

BeryJu commented 1 month ago

Deleting the provisioned group in authentik purposefully only removes the connection between the group in authentik and the group in the remote application; this needs to be clarified in the UI and in the docs.

I have not seen the stacktrace you posted above, which SCIM application is this configured with?