Commit graph

432 commits

Author SHA1 Message Date
George Wu 855e45bbb7 Small UI updates. (#3361)
* Delete unused htmx javascript files.

* Consistently mention applications instead of apps.

* Small formatting change for enrol device.

* Update phrasing in credentials page.
2025-01-24 09:30:02 +10:30
Firstyear 013661bbf4 Allow modification of password minimum length (#3345)
Allow all account policy values to be altered on system protected
objects.
2025-01-09 11:50:47 +10:00
Firstyear 51a976fed5 Ignore anonymous in oauth2 read allow access (#3336)
Administrators will sometimes configure oauth2 clients with `idm_all_accounts`
as an allowed scope group. Despite anonymous being *unable* to interact with
oauth2, this still allowed oauth2 clients to be read by anonymous in this
configuration. For some users, this may be considered a public info
disclosure.
2025-01-08 09:40:48 +10:00
Firstyear fee2d3b0d6 Resolve passkey regression (#3343)
During other testing I noticed that passkeys no longer worked
on a reauthentication. This was due to a regression in you
guessed it, cookies, where the auth session id wasn't being
removed properly.
2025-01-08 09:40:28 +10:00
James Hodgkinson a810bc43c0 Renaming "TOTP" in the login flow (#3338) 2025-01-08 09:40:28 +10:00
Firstyear 095df1b216 cookies don't clear unless you set domain (#3332)
* make everything cookie consistent
* Stricter on expiry
* Relearn a painful lesson about needing domains in removal cookies
* fix: DRY cookie creation code and reduce the sins
2025-01-04 10:34:29 +10:00
Firstyear 2f7279d8db Further SCIM sync testing, minor fixes (#3305)
This adds further testing of SCIM sync, especially around
conversion of the SCIM Sync Person and Group types into
SCIM Entry. This test would have prevented #3298 and
 #3299 from occuring.

During testing two more fixes were found. external_id should have
been required (not optional) and a group with no members would
cause a serialisation issue.
2024-12-21 17:22:02 +10:00
Firstyear 46ad459a56 Automatically trigger passkeys on login view (#3307)
Add an on-load handler to pkhtml.js so that when the partial
view is displayed passkey auth is automatically prompted for.
If the users browser blocks this event, the fallback manual
buttons still exist.
2024-12-21 17:22:02 +10:00
William Brown beb937f303 Re-add enrol another device flow
This was a commonly requested re-addition to the new webui. This
adds the ability for someone to scan a qr code or follow a link
to enrol another device to their account.
2024-12-21 17:22:02 +10:00
William Brown ab8dd18e4f Improved Cookie Removal
If a path isn't set then cookies aren't removed. More aggressively
remove cookies when they are no longer required.
2024-12-21 17:22:02 +10:00
Firstyear caa8b2d7a6 Limit OAuth2 resumption to session (#3296)
OAuth2 session resumption was accidentally made a permanent cookie
which led to continuing issues with it causing invalid redirections
after login. Make this a session only cookie.
2024-12-21 17:21:59 +10:00
Firstyear ab8ef8d977 Use specific errors for intent token revoked (#3291)
Rather than the generic 'invalid state' error, we now return
proper site-specific errors for credential commit failures, with
error messages to explain what went wrong.
2024-12-21 17:14:51 +10:00
Firstyear d4a373365e Autocomplete password during reauth with TOTP (#3290)
During a re-auth flow, the password was not autocompleted once
totp was autocompleted. This is because in a normal login flow
the autocomplete is performed on the first login.html page,
but in a re-auth we skip that page.

This adds the proper handling to allow the pw to autofill
in the background once the TOTP is completed.
2024-12-21 17:14:51 +10:00
Firstyear 0d967b8dbe Add CORS headers to jwks and userinfo (#3283)
When using jwks from a single page application, the keys and
userinfo were unable to be retrieved due to missing cors headers.
2024-12-13 15:26:29 +10:00
James Hodgkinson bc61225600 Check DNS on replication loop start not at task start (#3243) 2024-12-03 14:00:51 +10:00
Firstyear 2ee5f0ccc4 Work around systemd race condition (#3262)
Systemd reload can't handle us reloading so quickly which
causes "reload or restart" to always "restart" kanidm incorrectly.
2024-12-03 14:00:23 +10:00
James Hodgkinson dafc98b1db Allow OAuth2 loopback redirects if the path matches (#3252) 2024-12-03 14:00:23 +10:00
Firstyear c5f8196666 Correctly display domain name on login (#3254) 2024-12-03 14:00:23 +10:00
Firstyear d058b8c053 Resolve UI Auth Loop with OAuth2 (#3226)
If an OAuth2 auth request resume cookie was present, and at the same
time the kani instance was restarted, the cookie would now fail
to validate on the instance. This caused the user to experience an auth
loop where after every authentication they would see an error *despite*
logging in correctly, and then a refresh would show the correct
apps page.

This removes the auth_req cookie correctly even if it fails to
deserialise.
2024-11-22 12:14:06 +10:00
Firstyear abbce9edf3 Improve warning around invalid JWT deserialisation (#3224)
* Improve warning around invalid JWT deserialisation

* typo
2024-11-22 12:14:06 +10:00
Georg 6458660a24 Correct spelling of occurred (#3222)
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2024-11-22 12:14:06 +10:00
Firstyear a6dcb960d7 UI/Feature polish (#3191)
Post release some small user issues arose

* Optimise the autofocus for logins with passkeys to limit clicks
* Sort login mechs by strength
* Fix cookies to persist between browser restarts
2024-11-10 14:06:08 +10:00
Firstyear a6ecff0caa Prevent Invalid MFA Reg States (#3194) 2024-11-10 14:06:08 +10:00
George Wu 54cea7a9b7 Change CSS for applications so SVG scales nicely in Firefox. (#3200) 2024-11-10 14:06:08 +10:00
Firstyear ed20725817 20241109 3185 max age (#3196) 2024-11-10 14:06:08 +10:00
Firstyear 69ceb6c4f7 Hoist max_age to prevent incorrect deserialisation (#3190) 2024-11-10 14:06:08 +10:00
Firstyear 4f55b1cc33 Re-migrate all acps to force updating (#3184)
* Re-migrate all acps to force updating

* Update server/lib/src/server/migrations.rs

---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-11-08 14:19:10 +10:00
Firstyear c3e42ba257 security - low - fault in migrations (#3182)
A fault existed in the server's internal migration code, where attributes
that were multivalued would be merged rather than replaced in certain
contexts. This migration path is used for access controls, meaning that
on upgrades, attributes that were meant to be removed from access
controls or changes to access control target groups were not reflected
during the upgrade process.

This has a potentially low security impact as it may have allowed
users to change their name/displayname even if the administrator
had disable the name_self_write access control.
2024-11-07 14:33:11 +10:00
Firstyear 99573f2b94 Correct missing CSP header (#3177) 2024-11-05 14:50:27 +10:00
George Wu daba216803 Update missing inputmode numeric when adding a new TOTP. (#3160) 2024-10-30 12:24:36 +10:00
Firstyear 8afdc065bb Improve OAuth2 authorisation ux (#3158)
- Resolve an issue where oauth2 could trigger the login page to
  incorrectly redirect to an oauth2 application instead of apps
- Add indication of what client application we are accessing
  if the session is not yet authenticated
2024-10-29 18:16:27 +10:00
George Wu 750932b322 Change to text input and use numeric mode for TOTP prompts. (#3154)
* Change to text input and use inputmode numeric for TOTP prompts.

* Fix some typos.
2024-10-29 09:29:53 +10:00
Firstyear 2e6d940691
Remove WASM (#3148)
liberal party took over, more cuts
2024-10-26 17:19:13 +10:00
Wei Jian Gan bc55313d87
Harmonize UI and remove unused css (#3033)
-------

Co-authored-by: Wei Jian Gan <wg@danicapension.dk>
Co-authored-by: William Brown <william@blackhats.net.au>
2024-10-26 04:47:44 +00:00
James Hodgkinson 151a9ad90f
ripping out some extra packages (#3146) 2024-10-26 02:27:56 +00:00
James Hodgkinson 5a709520dc
OAuth2 Device flow foundations (#3098) 2024-10-26 12:08:48 +10:00
Firstyear b0824fef18
htmx by default (#3145)
* htmx by default

* restore the webmanifest

* fixing unused import

---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
2024-10-26 01:44:00 +00:00
Firstyear b7e682c43f
Support reloading via systemd (#3144) 2024-10-26 01:24:58 +00:00
CEbbinghaus dc56a3217d
Chore: Refactor Groups to be more generic (#3136) 2024-10-25 00:36:20 +00:00
Firstyear d2ae2ca206
20241024 1271 cert reload on SIGHUP (#3140)
reload certificates and keys on SIGHUP
2024-10-25 00:01:30 +00:00
Firstyear ccb3848b88
Fix image when too smol (#3138) 2024-10-23 17:11:12 +10:00
James Hodgkinson bbe9ad1a06
yale's rabbit-hole-chasing-htmx-fixing-megapatch (#3135) 2024-10-23 16:04:38 +10:00
Firstyear 31420c3ff9
ipinfo should be single value (#3137) 2024-10-23 02:39:40 +00:00
Firstyear 48cd6638fe
Tidy the reauth ui (#3130)
* Tidy the reauth ui
2024-10-23 11:59:05 +10:00
George Wu 8b4d0d6ead
Add missing schemas to get OpenAPI validation to pass. (#3129) 2024-10-22 08:27:37 +10:00
George Wu 7eb54be487
Change some OperationError into HTTP Bad Request (400). (#3125) 2024-10-21 02:57:23 +00:00
George Wu 57aeeb5f94
Fill in some Swagger API docs for a few v1 endpoints. (#3126) 2024-10-20 07:56:34 +00:00
Merlijn 5064712fe6
Fix passkey auth flow redirects (#3123)
* Fix passkey auth flow redirects
* Handle webauthn error
2024-10-20 09:24:41 +10:00
George Wu a0944b8601
Log HTTP Not Found (404) as info log level. (#3119) 2024-10-19 07:00:29 +00:00
Firstyear 5a3e5f1e07
20241017 3107 token ttl (#3114) 2024-10-18 03:28:52 +00:00