forked from saltstack/salt
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[auth/netapi/salt-api] trust X-Remote-User in salt-api
Add a way to get an unauthenticated token when we've set the salt-api to trust a frontal to be doing the authentication (related to saltstack#24793)
- Loading branch information
1 parent
d71d75e
commit 5f16cab
Showing
4 changed files
with
73 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# -*- coding: utf-8 -*- | ||
''' | ||
Provide authentication using Kerberos by trusting webapp. | ||
This is a placeholder auth module that does not authenticate with kerberos | ||
.. versionadded:: TODO | ||
''' | ||
|
||
from __future__ import absolute_import | ||
import logging | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
def auth(username, **kwargs): | ||
''' | ||
Refuse authentication always. This gives the opportunity to use | ||
the Remote User mecanism in salt-api | ||
This prevents a local user from bypassing authorisation | ||
TOOD : link to documentation about how to enable X-Remote-User in salt-api | ||
''' | ||
log.debug('returning False for kerberos trusted auth') | ||
return False | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters