46 Commits

Author SHA1 Message Date
Johannes Meyer
078fdc84ab Manager: Perform module loading asynchronously
So that authentication can suspend it. There are cases,
e.g. cube, where authentication is required in run.php.
During bootstrapping loading modules is mostly required
to load libraries, register routes and hooks. Most of the
time authentication is not required for these, but if
it is, evaluation is now interrupted and continued
after authentication has actually been performed.

I don't see a real risk for any breaking change here,
since authentication happens shortly after. It actually
avoids a breaking change, since without this, cube's
Icinga DB support would break or at least malfunction.

And cube is only a single example.

refs #5265
2025-07-08 16:41:18 +02:00
Johannes Meyer
4ebd1e42e0 Auth: Perform authentication only once and not lazily
Since authentication is now performed even for static
resources, there's no reason anymore to support implicit
authentication. This also limits authentication attempts
to a single one, previously failed attempts were repeated.

Requiring authentication during bootstrapping, i.e. before
authentication has been performed, will now trigger a
deprecation notice.

refs #5265
2025-07-08 16:41:18 +02:00
Sukhwinder Dhillon
aad2419545 Remove obsolete config_backend option and not required code
The user preferences backend is now always a `db`.
2022-05-27 14:02:11 +02:00
Sukhwinder Dhillon
8ff1a22df7 Set preferences store type to Db and make it non-configurable 2022-05-27 13:55:48 +02:00
Alexander Aleksandrovič Klimov
874af33d81 Correct Auth#getUser() type spec
Doc says it may be null.
2022-04-11 13:30:24 +02:00
Johannes Meyer
3dc384fb58 Avoid passing null to non-nullable arguments 2022-03-24 12:29:06 +01:00
Johannes Meyer
82485236f7 Auth: Also reload theme mode if no theme is active
refs #4390
2021-06-24 09:44:28 +02:00
Sukhwinder Dhillon
492a9ec229 Auth: Reload CSS if mode change 2021-06-23 17:34:27 +02:00
Johannes Meyer
a87f15c861 Auth: Reload entire layout if the locale changes 2021-05-17 13:20:42 +02:00
Johannes Meyer
f4da973f68 Auth: Only reload CSS upon login if the theme **really** changed
fixes #2233
2021-04-07 14:30:14 +02:00
Johannes Meyer
0aa4e25723 Auth: Introduce method setupUser()
This was previously part of method `setAuthenticated()`.
Split up to allow external usage.
2021-04-07 14:30:14 +02:00
sukhwinder33445
ab97b6fdf0
Enforce database as configuration backend (#4135) 2021-02-18 12:31:21 +01:00
Eric Lippmann
990a5e4d61 Introduce Auth::setUser() 2020-03-02 14:15:53 +01:00
Thomas Gelf
08c879249b Auth: do not ask for unrelated group membership
If a specific User-Backend has been assigned to a Group Backend, and
the User has been authenticated by another User-Backend, then there is
no need to ask the unrelated Groups Backend for membership.
2018-12-18 14:51:13 +01:00
Johannes Meyer
2f9037e545 Auth: Log which groups were identified for the user being authenticated 2018-10-08 14:02:26 +02:00
Johannes Meyer
f28f7150fc AuditHook: Enforce a named identity and allow to pass a explicit time 2018-07-18 14:45:00 +02:00
Johannes Meyer
3f66bd7437 Auth: Log login/logout activities to the audit log
refs #2563
2018-06-08 14:21:15 +02:00
Eric Lippmann
41acffdc24 Login: set the default domain if necessary
refs #2153
2017-06-12 13:31:07 +02:00
Michael Friedrich
08a82daea3 Update to icinga.com
refs #2687
2017-01-18 12:04:43 +01:00
Eric Lippmann
4eb61c2bcf Revert breaking change in Auth::isAuthenticated()
refs #12580
fixes #13281
2016-12-06 12:41:22 +01:00
Eric Lippmann
2b060d9bd4 Challenge API requests only if the controller requires auth
fixes #12580
2016-11-07 10:40:38 +01:00
Eric Lippmann
99d08bf03b Get remote user from $_SERVER if env does not have it in external auth
refs #11391
2016-04-11 14:09:04 +02:00
Eric Lippmann
f1f4cdc3cb lib: Use AdmissionLoader::applyRoles() in Auth
refs #10887
2016-03-24 15:30:30 +01:00
Markus Frosch
929f45deea Fix session resume for external auths
When REMOTE_USER is not available from _SERVER (PHP internal webserver)

fixes #11277
2016-03-02 17:39:05 +01:00
Alexander A. Klimov
c78a7912e7 Fix parse error in Auth.php 2016-02-15 14:50:33 +01:00
Alexander A. Klimov
74b4c344d6 Shorten check for empty auth header
refs #11151
2016-02-15 14:22:36 +01:00
Alexander A. Klimov
8a4f15d32c Don't redirect unauthenticated API requests to the login page
refs #11151
2016-02-15 13:36:29 +01:00
Alexander A. Klimov
a464e74aa4 Allow basic auth for API requests only
refs #11151
2016-02-15 10:53:32 +01:00
Alexander A. Klimov
dc9cfc1c81 Call getRequest() only once in Auth::authHttp()
refs #11151
2016-02-15 10:44:33 +01:00
Alexander A. Klimov
4c97fb7d01 Don't request basic auth if auth scheme isn't basic
fixes #10506
2016-02-15 10:39:18 +01:00
Alexander A. Klimov
474803fee4 Change all license headers to only reflect a file's year of creation
refs #11000
2016-02-08 15:41:00 +01:00
Eric Lippmann
9968fb9011 Reload CSS after login because the user may have a different theme (WIP)
This is just a quick fix.

refs #10957
2016-01-18 12:56:02 +01:00
Eric Lippmann
0cc54ce34b Refresh session every 10 minutes
Quick and dirty fix.

fixes #10229
2015-11-16 14:19:33 +01:00
Eric Lippmann
feed927fd2 Let external auth win over session auth and session auth over http auth
refs #9660
2015-07-30 14:50:05 +02:00
Eric Lippmann
55ad2dd65f Don't fail if password contains a colon on basic auth
refs #9660
2015-07-30 13:59:47 +02:00
Eric Lippmann
c594d6db33 Challenge client on invalid basic access auth credentials
refs #9660
2015-07-30 13:59:18 +02:00
Eric Lippmann
3aae37aff3 Don't redirect on external auth
refs #9660
2015-07-30 12:02:42 +02:00
Eric Lippmann
36ff2d8914 lib: Set User::$isHttpUser in Auth
refs #9660
2015-07-30 09:32:24 +02:00
Eric Lippmann
cf8c680482 lib: Add basic access authentication (WIP)
refs #9660
2015-07-29 17:22:55 +02:00
Eric Lippmann
3ca85f9daa lib: Add Auth::getRequest()
Basic auth will require the request.

refs #9660
2015-07-29 15:56:45 +02:00
Eric Lippmann
96e3111f58 lib: Reorder functions in Auth
refs #9660
2015-07-29 15:52:56 +02:00
Eric Lippmann
1b5c5deace lib: Rename remote user to external user
We renamed our backend. Code now reflects this.

refs #9660
2015-07-29 15:44:32 +02:00
Eric Lippmann
ae4b7144cd lib: Implement Auth::getAuthChain()
Saves one use statement for auth chain usages.

refs #9660
2015-07-29 14:14:19 +02:00
Eric Lippmann
07849e0fea lib: Rename Authentication/Manager to Authentication/Auth
refs #9660
2015-07-28 17:08:55 +02:00
Jannis Moßhammer
3199f21f29 Added License header, removed deprecated or empty files
refs #4265
2013-06-11 13:33:16 +02:00
Jannis Moßhammer
54ccb9b12a Move libraries from incubator to working tree for evaluation
Add all untested files from incubator's library/Icinga to working
tree library/Icinga

refs #4257
2013-06-07 15:46:33 +02:00