Commit graph

2187 commits

Author SHA1 Message Date
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
William Brown a7fabdedef Release 1.4.5 2024-12-21 17:34:49 +10:00
Firstyear 4803710026 nss/pam resolver should reauth faster (#3309)
This can have visible impacts on accounts that don't have a pam password
cached yet, but then appear to "stall" for a minute or two until it works
due to the fact that the provider was offline and waiting to reauth.

When we are still connected but our provider auth session has expired
we should reconnect faster. This reduces the timeout for reauthentication
for the provider so that it can return to the online state sooner. We
also loop when we detect the provider session is no longer authenticated
so that we can reauth immediately, rather than causing a noticable
interuption.
2024-12-21 17:22:02 +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 e0bc19d033 Allow reseting account policy values to defaults (#3306)
* Allow reseting account policy values to defaults

This allows the admin cli to reset account policy values to
defaults by clearing them. Due to how account policy resolves
a lack of value implies the default.
2024-12-21 17:22:02 +10:00
Firstyear f481e033ef Incorrect member name in groups (#3302)
Member was accidentally set to members which prevented
group synchronisation.
2024-12-21 17:22:02 +10:00
Firstyear 1909d1a15a SCIM Sync Missing Annotation (#3300)
A missing serde annotion in SCIM Sync caused groups to fail to
sync unless they had a description. This resolves the failure
by adding the correct annotation to skip None fields in groups.
2024-12-21 17:22:02 +10:00
Firstyear 6b0c8be718 Ignore system users for UPG synthesiseation (#3297)
Our unix resolver would attempt the right thing to synthesise
user private groups on linux as these are an important security
boundary. However, it turns out that almost every distro has
botched their default system user accounts, and many are
installed with numeric-only UPGs that don't resolve. In the
case that later the user does attempt to fix that, because we
synthesised as UPG for the system account, the user trying to
add the UPG would now fail. In some cases this could cause
system updates to be prevented from installing.

This change limits UPG synth to user accounts only (uid > 1000)
which is the common uid boundary on unix-like platforms.
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
William Brown c3dbf83312 Release 1.4.4 2024-12-03 15:55:10 +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
Firstyear 7c82c951f5 Clear invalid tokens from unix resolver (#3256) 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 24c95ff5ff Display account_id during success/deny paths in unixd (#3253) 2024-12-03 14:00:23 +10:00
George Wu a2119c54c5 s/idm_people_self_write_mail/idm_people_self_mail_write/g (#3250) 2024-11-30 11:25:39 +10:00
James Hodgkinson c464f0bd9e handle missing map_group setting in config (#3242) 2024-11-29 12:13:06 +10:00
micolous 2882967f54 owncloud: Add SameSite=Lax config for cross-domain auth (#3245) 2024-11-29 12:13:06 +10:00
James Hodgkinson d6f6a2671d Yaleman/issue3229 (#3239)
* Fix wrong success message on kanidm group set-entry-manager #3229
2024-11-25 09:39:18 +10:00
Firstyear 078625cbf9 Update to latest fido-mds-tool (#3230) 2024-11-22 17:03:57 +10:00
William Brown fb001765ae Release 1.4.3 2024-11-22 12:27:13 +10:00
Firstyear e04d0680a4 Warn when v2 options are used in v1 unixd config (#3228)
Options like map_group would fail silently when version=2 wasn't
set in our unix config. this detects that case and warns that it
is occuring.

To prevent this in the future, we deny unknown keys in v2 so that
if (when?) we add v3, new keys will cause an error.
2024-11-22 12:14:06 +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 2dd8891d51 Harden transport in pam unixd (#3227)
In some cases if the transport drops out from underneath unixd,
it can be difficult to diagnose and leads to inconsistent errors
and output such as prompting for a password multiple times when
it can't succeed.

This makes it clearer that the transport had an error, and it
denies the inflight authsession to prevent spurious password
prompts.
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
George Wu 9bd1fe1481 Update and fix server config files in examples. (#3225) 2024-11-22 12:14:06 +10:00
George Wu f6d16ff08a Change CLI oauth2 command from set-display-name to set-displayname for consistency. (#3212)
* Change CLI domain command from set-display-name to set-displayname for consistency.

* Also fix CLI.
2024-11-22 12:14:06 +10:00
George Wu e4c6ca767e Add docs on customising Kanidm. (#3209)
* Add docs on customising Kanidm.

* Add more info about images that can be used.

* s/set-display-name/set-displayname/g
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
William Brown ee5c382d8e Release 1.4.2 2024-11-08 14:20:27 +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
William Brown ad93202992 Release 1.4.1 2024-11-05 14:56:33 +10:00
Firstyear 99573f2b94 Correct missing CSP header (#3177) 2024-11-05 14:50:27 +10:00
Firstyear 78ced241eb Resolve pam services not always having a tty (#3176) 2024-11-05 11:06:57 +10:00