Don't propagate the exception if configured auth backend doesnt expose
grooup information when trying to retrieve groups on succesful auth.
Note: The same check already happens as pre-runtime check when st2auth
start and there that is an operator error which needs to be rectified.
This is just an additional safety check.
@@ -173,8 +173,12 @@ class StandaloneAuthHandler(AuthHandlerBase):
# If remote group sync is enabled, sync the remote groups with local StackStorm roles
if cfg.CONF.rbac.sync_remote_groups:
- # TODO: Sync user remote role assignments
+ try:
user_groups = self._auth_backend.get_user_groups(username=username)
+ except NotImplementedError:
+ LOG.debug('Configured auth backend doesn\'t expose group information, '
+ 'skipping sync...')
+ return token
if not user_groups:
# No groups, return early
