salt icon indicating copy to clipboard operation
salt copied to clipboard

[master] Use token's eauth key if load omits it.

Open RyanFrantz opened this issue 8 months ago • 4 comments

What does this PR do?

  • For token-based authentication, where administrators would also like to write a custom eauth ACL module, this update allows __get_acl to check for such a module, either via the eauth_acl_module configuration value or fallback to the eauth module's acl function, if defined.

What issues does this PR fix or reference?

N/A

Previous Behavior

If load["eauth"] is not defined, __get_acl() immediately returns None.

New Behavior

In get_auth_list(), if the "eauth" key is not present in the load dictionary, but is present in the token dictionary, the token's "eauth" value is added to the load dictionary. When __get_acl() is called from within get_auth_list(), the former can attempt to perform an ACL lookup via the eauth_acl_module configuration option or fall back to the eauth module's acl() function, if defined.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

  • [ ] Docs
  • [ ] Changelog - https://docs.saltproject.io/en/master/topics/development/changelog.html
  • [ ] Tests written/updated

Commits signed with GPG?

No

Please review Salt's Contributing Guide for best practices, including the PR Guidelines.

See GitHub's page on GPG signing for more information about signing commits with GPG.

RyanFrantz avatar Jun 24 '24 17:06 RyanFrantz