2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-08-31 15:28:17 +00:00
Commit Graph

133 Commits

Author SHA1 Message Date
Jarrod Johnson
b6a0250e5c Advance state of asyncio
Add a mechanism to close a session the right way
in tlvdata

Fix confluentdbutil/configmanager to restore/dump db to directory

Move auth to asyncio away from eventlet

Fix some issues with httpapi, enable reading body via aiohttp

Fix health from ipmi plugin

Fix user creation across a collective.
2024-06-13 16:32:02 -04:00
Jarrod Johnson
4c3f93765f Have async and traditional client
Since a lot of the traditional client did not need async,
make life easier by just having them in parallel for now.

The server must use the async client, but the client applications can
stick with the somewhat more straightforward synchronous client.
2024-05-29 12:23:05 -04:00
Jarrod Johnson
c3cafd9bf8 Purge eventlet and greenlet and long-polling support
Rather than try to support long deprecated http api behavior,
purge it for simpler code and remove eventlet/greenlet from the http
stack.
2024-04-11 09:09:02 -04:00
Jarrod Johnson
7b2e32009f Numerous async improvements
Restore 'as available' behavior to noderange over socket

Bring the httpapi to the point where the webui is able to start working,
notably bringing the asynchttp online with the websocket.

Fix a flaw in the async ipmi that would cause hangups.
2024-04-04 17:13:37 -04:00
Jarrod Johnson
587ccd13cc More work toward asyncio
aiohttp now covers a lot of httpapi GET, and some of websocket.
2024-04-03 16:58:40 -04:00
tkucherera
fcb3d917db use socket.getaddrinfo 2024-01-26 17:14:04 -05:00
tkucherera
16ad4e776f opening web ui using default ip 2024-01-26 12:39:25 -05:00
Jarrod Johnson
9c9d71882c Disable keepalive
Unfortunately, apache can get a bit odd over how it
reports a non-viable open socket for keepalive, which
can happen in certain windows.

Disable the keepalive feature and take some performance penalty in
browsers for the sake of more consistent return behavior and
fewer idle greenthreads doing nothing.
2023-10-19 15:51:40 -04:00
Jarrod Johnson
4056264991 Correct keyname from previous fix 2023-06-23 17:01:50 -04:00
Jarrod Johnson
77c8e93a8d Fix terminal actions on shared websocket
The full complement of functionality was not
interpreted in shared context
2023-06-23 16:33:30 -04:00
Jarrod Johnson
75f0aaeee9 Allow session id through header
This permits a client to exert finer grained control
over the session id
than provided by cookie.
2023-06-08 11:30:32 -04:00
Jarrod Johnson
c57090a670 Correct order of find and replace strings in by-mac boot 2022-10-24 13:26:06 -04:00
Jarrod Johnson
29ad1bd57e Add various ways to look up boot file 2022-10-24 12:31:23 -04:00
Jarrod Johnson
8de7402b56 Add ability to get booturl redirect
In some environments, there's a desire to manually manage DHCP configuration.
In such a case, provide a url
that can be given to the dhcp server
to allow confluent to control the profile
without updating such a DHCP service.

With this change, a node can be told to boot:
http://confluentserver/confluent-api/booturl/by-node/n123/boot.ipxe

To be redirected to the currently applicable os profile.
2022-10-13 10:54:11 -04:00
Jarrod Johnson
3c29a5aa7f Enable non-admin users for web gui 2022-10-06 08:49:00 -04:00
Jarrod Johnson
2256b341b9 Tolerate '/' in hardwaremanagement.manager
This paves the way to allowing CIDR syntax to
indicate prefix length for remote XCCs
2022-07-21 09:54:00 -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
6229cb23e8 Begin PDU implementation 2022-05-10 16:00:08 -04:00
Jarrod Johnson
212aa5c6e2 Add ability to unsubscribe from a terminal session 2022-04-13 16:44:01 -04:00
Jarrod Johnson
2bf9a6d415 Add support for consolidated term websocket
Since browsers can be stingy with websockets, have
the consoles all share a single websocket.
2022-04-13 16:08:13 -04:00
Jarrod Johnson
7a0dee8af8 Fix keepalive/logout behavior in ws async
Use the websocket liveness as the keepalive, so
the reaper is not scheduled for such sockets.

Additionally, register the async thread as to be killed on logout.
2022-04-05 16:56:36 -04:00
Jarrod Johnson
105536656e Implement async session on websocket
This eliminates long polling and sets the stage to restore
socket sharing by terminals and shells.
2022-04-05 16:33:03 -04:00
Jarrod Johnson
f1bc82cd08 Fix logic of websocket handling
Do not fall through to non-websocket path after handling the websocket
2021-11-05 14:15:39 -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
1f9c440525 Handle non-utf8 console data
Sometimes console uses non-utf8.

Fallback to cp437 when utf8 fails us.
2021-04-22 15:14:52 -04:00
Jarrod Johnson
bf00c75f43 Specify supported protocols to be confluent.console
Eventlet will return no supported protocols if
none are specified. Firefox doesn't care, but
chrome rejects such a reply.
2021-04-22 07:44:18 -04:00
Jarrod Johnson
479ddd582e Induce python2 to unicode
eventlet will treat str as binary,
correct by forcing unicode.

For python3, it is a no-op, but
python2 needs it to pass the 'text_type' check in eventlet.
2021-04-21 15:33:27 -04:00
Jarrod Johnson
d82690f0d9 Fix python3-ism
python2 doesn't understand how to return
an iterator from within an iterator.
2021-04-21 13:31:11 -04:00
Jarrod Johnson
9009f63b2d Implement websocket based terminal access 2021-04-20 15:49:07 -04:00
Jarrod Johnson
ab6bf82da6 Begin draft work to support websocket
First use case will be consoles.

Then we can consider the async case
for smoother async operation as well
though that is less critical.
2021-04-19 17:04:26 -04:00
Jarrod Johnson
95659db00a Stop trying to use generic cookie parsing
Trying to do so while guarding against errors and sanitizing input was more code and slower
than targeting the one possible cookie we might care about.

So the code is simpler and
the performance is better, and the effect of stray cookies are mitigated.
2020-10-29 11:36:26 -04:00
Jarrod Johnson
3ac6677d2d Sanitize cookies
If an invalid cookie from another site breaks the cookie jar,
then sanitize it.

https://bugs.python.org/issue31456

Performance enhancement through setting a header in javascript in
lieu of cookie parsing seems a wise move for the future.
2020-10-24 11:10:52 -04:00
Jarrod Johnson
e8eaddf375 Fix for HTTP API browser
Python 3 had data coming in as bytes.
2020-08-27 13:11:21 -04:00
Jarrod Johnson
bf706f82cf Fix a typo in httpapi 2020-08-05 08:28:30 -04:00
Jarrod Johnson
16667ed41c Add SSH cert to self api
This allows nodes to get a cert from
confluent.
2020-04-16 13:11:05 -04:00
Jarrod Johnson
dcdc8e4d5a Merge branch 'master' into osdeploy 2020-04-16 12:10:03 -04:00
Jarrod Johnson
f97fd3105f Prevent GET from indicating a non-idempotent opreation
This could bypass CSRF protection in theory.
2020-04-16 12:08:47 -04:00
Jarrod Johnson
58fd760698 Implement begins of self api
This paves the way to get deployment started
in earnest.
2020-04-10 16:46:41 -04:00
Jarrod Johnson
ed050b37e1 Fix httpapi with python3
async is now particularly special,
rename variable to fix it
2020-04-10 11:58:45 -04:00
Jarrod Johnson
331d10140a Fix httpapi with python3
async is now particularly special,
rename variable to fix it
2020-04-10 11:57:59 -04:00
Jarrod Johnson
453c344f7f Fix audit log for non root usage with python 3 2019-10-10 16:07:45 -04:00
Jarrod Johnson
bc85d93cf4 More Py3 fixes 2019-10-09 11:20:03 -04:00
Jarrod Johnson
1e963106fe Fix unicode issues with web api 2019-10-09 11:03:30 -04:00
Jarrod Johnson
a9f0e345db Another set of python3 fixes 2019-10-08 17:10:56 -04:00
Jarrod Johnson
90e546bcac Implement a number of py3 compatible adjustments 2019-10-02 08:58:39 -04:00
Jarrod Johnson
fbc4fc6846 Make unexpected error more specific
Often a usable summary message is obfuscated.  Assume the subject line
is safe to relay, but continue to do a more verbose trace.
2019-07-08 14:28:56 -04:00
Jarrod Johnson
6d5f0cdb16 Make TCP_FASTOPEN opportunistic
Certain Linux-like but not Linux environments fail
at this.
2019-06-27 15:36:27 -04:00