2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-24 08:44:05 +00:00
Commit Graph

50 Commits

Author SHA1 Message Date
Jarrod Johnson 198ffb8be6 Advance asyncio port
Purge sockapi of remaining eventlet call

Extend asyncio into the credserver to finish out sockapi.

Have client and sockapi complete TLS connection including password checking

Fix confetty ability to 'create'.
2024-04-01 16:38:10 -04:00
Jarrod Johnson 987587aaf8 Allow custom auth file to define valid roles 2023-07-26 16:37:55 -04:00
Jarrod Johnson ad25c31d3f Correct error in check_for_yaml function in auth 2023-07-26 16:15:36 -04:00
Jarrod Johnson 15ff24fccd Correct syntax errors in auth.py 2023-03-10 16:38:47 -05:00
erderial 85f9dc12fb Update auth.py 2023-03-09 22:38:37 +02:00
erderial 56dea2422a Update auth.py 2023-03-07 21:08:01 +02:00
erderial b800aa032e updated auth.py with some changes
updated auth.py with some changes. Need to add the check_for_yaml() function to main.py as well
2023-02-27 17:10:17 +02:00
erderial 8940247164 updated with custom yaml file for auth
Added 2 new function to check if the custom yaml file exists - /etc/confluent/authorize.yaml - and one to update the _allowbyrole and _deniedbyrole vars accordingly.
2023-02-21 15:13:17 +02:00
Jarrod Johnson 3c29a5aa7f Enable non-admin users for web gui 2022-10-06 08:49:00 -04:00
Jarrod Johnson 44cf56857e Add fallbacks to PyCrypto compatible names
Cryptodome is not always packaged with the
explicit form, fall back to the Crypto names
hoping that the user wouldn't be trying to use
PyCrypto is this day and age.
2022-06-09 10:48:12 -04:00
Jarrod Johnson 3c3d6bb314 Fix auth handling of the session/info 2022-05-25 17:40:35 -04:00
Jarrod Johnson f6a17b5f32 Have validate serve as session info request
This should facilitate login.

Further, provide a quick persistence for the
credential test backend
2022-05-25 15:58:20 -04:00
Jarrod Johnson c93f09bc91 Provide hook to get registered credentials
This has to relax the session in getting and requesting validation.
2022-05-24 19:17:31 -04:00
Jarrod Johnson 9b39c96135 Begin work on webauthn support
Provide appropriate registration options as a first
step.
2022-05-24 10:22:34 -04:00
Jarrod Johnson 9c43dbff47 Rework MFA handling
Avoid calling PAM in the parent process, as
this seems to cause problems with some PAM
configurations.
2021-06-28 11:34:11 -04:00
Jarrod Johnson f830514d10 Implement support for additional pam prompts
For example, if PAM has OTP, then support it.
2021-06-25 17:26:32 -04:00
Jarrod Johnson b8c9e9c535 Begin work to support complex PAM conversations
For example, TOTP setups need
more prompts, this will pass
the info to the client for the client to adjust.
2021-06-23 16:31:42 -04:00
Jarrod Johnson 46396247bb Fix remote passphrase authentication
For python 3 platforms, the
db hosted hash
needed the str changed
to bytes explictly.
2020-09-02 08:54:29 -04:00
Jarrod Johnson 5b0389000e Fix handling of password through TLS socket 2020-08-20 08:28:06 -04:00
Jarrod Johnson 4437e81e04 Leverage unix_chkpwd
If doing PAM authentication, we
can setuid to the target user and then
pam_unix will use unix_chkpwd on
our behalf.

Problems with this working in the lab
was resolved by a yum reinstall pam,
so it was presumably due to messed up
setcap or similar experiments.
2020-02-13 10:37:15 -05:00
Jarrod Johnson 7480494432 Tighten up new PAM check
For one, remove the password cache cleaning, as it no longer is run.

For another, skip the fork if uid is already 0.

Finally, wrap the check in a try/finally to keep the privileged process
more certain in exiting.
2020-02-06 10:05:57 -05:00
Jarrod Johnson 49c00bfbb7 Become root to check a password
Running as non-root had broken PAM support.  Allow setuid so we
can assume root in one specific case.
2020-02-05 16:06:13 -05:00
Jarrod Johnson 44e6a72847 Switch to using the defined service
For now, this makes no difference, but it is poor form,
probably.  Correct by referencing the variable
name.
2020-02-03 09:57:02 -05:00
Jarrod Johnson 895b5264f6 Fix incorrect pam service
pam was defaulting to use of 'login', but we want 'confluent' for the service.
2020-02-02 18:18:39 -05:00
Jarrod Johnson 954b2dd15c Fix minor formatting issues in source 2020-01-07 09:38:40 -05:00
Jarrod Johnson d9f1d6c033 Fix user/password login in python3
The forced bytes of the function was incompatible
with str oriented logic later
2019-10-11 13:21:55 -04:00
Jarrod Johnson 9eceda0636 Fix non-root user issue with python3 2019-10-10 16:04:23 -04:00
Jarrod Johnson a9f0e345db Another set of python3 fixes 2019-10-08 17:10:56 -04:00
Jarrod Johnson 147d59cba7 Migrate from PyPAM
PyPAM is no longer part of the distributions.  Closest match is also not in
the distributions and also contains a security problem without an external
patch, so it is pulled in and pull request with copyright and license
intact.
2019-10-01 11:28:43 -04:00
Jarrod Johnson 99d01d707f Fix incorrect bad auth on freshly changed password
If the database backing the password had changed but cache hadn't updated,
then the cache miss was taken as always meaning no valid login.
2019-09-05 11:09:11 -04:00
Jarrod Johnson 5ac0a6e650 Fix raid configuration for operator
Operator was not allowed to create arrays.
2019-05-14 10:42:42 -04:00
Jarrod Johnson cc5a5c9972 Fix operator add and delete of nodes
This permits operators to run nodedefine and noderemove.
2019-05-10 13:15:19 -04:00
Jarrod Johnson cd2361b80b Fix nodediscover clear for operators
Operators should be allowed to delete discovery data.
2019-05-10 13:11:04 -04:00
Jarrod Johnson 3564de8c6d Fix web consoles/shells for operators
Operator role needed more permissions to act as expected.
2019-05-07 15:58:34 -04:00
Jarrod Johnson 7b5361a019 Add expressions to Operator role
noderun/nodeshell would not work for operators without this.
2019-05-03 09:06:20 -04:00
Jarrod Johnson a6809aae98 Add Monitor role
Add a monitor role that is only viable for monitoring relevant
tasks.
2019-05-02 10:04:40 -04:00
Jarrod Johnson 4d5bfb13bf Add support for Operator role
Support a reduced privilege user that can still perform
most operations, but cannot modify, delete, or add
users/groups to confluent or to BMCs.
2019-05-01 16:57:15 -04:00
Jarrod Johnson 31f2161b57 Add user groups to confluent
This allows a system/ldap group to be used instead of directly
specifying individual authorized users.
2019-04-30 14:55:54 -04:00
Jarrod Johnson 34b30a1bd8 Rework password authentication
Have the cache operate against the sha256 of the passphrase rather
than the passhprase directly (mitigate presence of password in memory).

Pull PAM into the cache behavior to accelerate PAM based usage.

Rearrange things so that both built in confluent and PAM passwords
can be used.
2018-11-14 14:52:03 -05:00
Jarrod Johnson 282043ed97 Switch to cryptodome
Cryptodome is a modern, but compatible replacement for pycrypto.

We may move to cryptography eventually, but start with this for now
for some nice speedups in some cases.
2018-07-03 10:31:13 -04:00
Jarrod Johnson 919dab9b55 Create auth multiprocessing pool on demand
Most of the time, we don't need this pool.  Create when needed,
and clean up after 30 seconds of inactivity.  This avoids a slow
shutdown that was due to core python hanging in help_finish_stuff,
and as a bonus means most of the time, one only sees one confluent
process, which has been a source of questions already.
2017-03-05 08:28:35 -05:00
Jarrod Johnson d0bd275cb3 Instrument sessions/ collection
This causes some additional features into core.  Namely
the ability to use a fixed module rather than a string
defined plugin.  This allows shellserver to implement the
'plugin' interface without living in 'plugins'.  'plugins'
implies modularity and potential eventual choice, but
this functionality is core.  It would make sense for the
'attributes' plugin to be changed to match this strategy.
2016-01-08 14:44:42 -05:00
Jarrod Johnson 765c15ed5b Revert 'confluentd' change
After further investigation, the rename to confluentd was not
needed (after massaging pathex and using pip to install rather
than distutils).
2015-09-23 11:48:27 -04:00
Jarrod Johnson 29417d935c Phase 2 of Windows compatibility
More work to try to enable confluent to be frozen by
pyinstaller
2015-09-23 11:48:20 -04:00
Jarrod Johnson b48cd8b685 Implement basic functionality under windows
Windows support by removing pid file, daemonizing, locking,
and other features.  Goal is to have a freezeable payload.
2015-09-23 11:48:17 -04:00
Jarrod Johnson a009f4c6d1 Change PAM behavior for authorization
Previously, any PAM result was treated as good.  This isn't
actually of practical value, since we need a user object to
really do authorization.  Change strategy to give pam a chance
to deny anyone, but require the user to exist in confluent
even if pam says the user is a valid one.
2015-02-03 11:04:32 -05:00
Jarrod Johnon 5012c9e401 For skipauth clients, allow a 'shutdown' verb
To facilitate a clean coordinated shutdown, create a verb so that a termination can be done
and know when it is completed.  Only allow for the 'special' case of 'skipauth', where unix domain
socket connection is in hand and only root or the service owner can access.
2014-10-07 11:14:22 -04:00
Jarrod Johnson 12f939a533 Extend HTTP token to work correctly with PAM authentication 2014-07-14 15:03:34 -04:00
Jarrod Johnson c70f365cd2 Add support for RPM builds
add supportfor pam authentication
2014-07-14 14:54:12 -04:00
Jarrod Johnson c5cb5649d5 Begin reorganizing content for packaging 2014-05-06 13:37:31 -04:00