Commit Graph

69 Commits

Author SHA1 Message Date
openhab-bot
07be655b0e
New Crowdin updates (#3109)
* New translations automation.properties (Italian)
* New translations restauth.properties (German)
* New translations restauth.properties (Italian)
* New translations addons.properties (Italian)
* New translations restauth.properties (Danish)
* New translations restauth.properties (Finnish)
* New translations restauth.properties (Hungarian)
* New translations restauth.properties (Polish)
2022-10-15 09:27:02 +02:00
J-N-K
ef3b13fce8
Fix AuthFilter crash if trusted network not configured (#3110)
* Fix AuthFilter crash if trusted network not configured

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-10-13 08:09:23 +02:00
GiviMAD
3ba0b8cf6d
[auth] grant implicit user role by network address (#3106)
* [auth] grant implicit user role by network

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2022-10-10 19:57:31 +02:00
openhab-bot
c4f0ab44df
New Crowdin updates (#3054)
* New translations units.properties (Portuguese)

* New translations units.properties (Portuguese, Brazilian)

* New translations firmware.properties (Slovenian)

* New translations units.properties (Slovenian)

* New translations validation.properties (Slovenian)

* New translations messages.properties (Slovenian)

* New translations tags.properties (Danish)

* New translations tags.properties (Slovenian)

* New translations DefaultSystemChannels.properties (Slovenian)

* New translations LanguageSupport.properties (Slovenian)

* New translations SystemProfiles.properties (Slovenian)

* New translations jsonStorage.properties (Slovenian)

* New translations network.properties (Slovenian)

* New translations i18n.properties (Slovenian)

* New translations voice.properties (Slovenian)

* New translations chart.properties (Slovenian)

* New translations persistence.properties (Slovenian)

* New translations addons.properties (Slovenian)

* New translations restauth.properties (Slovenian)

* New translations ephemeris.properties (Slovenian)

* New translations inbox.properties (Slovenian)

* New translations audio.properties (Slovenian)

* New translations hli.properties (Slovenian)

* New translations lsp.properties (Slovenian)

* New translations marketplace.properties (Slovenian)

* New translations sitemap.properties (Slovenian)

* New translations SystemThingStatusInfos.properties (Slovenian)

* New translations magic.properties (Slovenian)

* New translations automation.properties (Hebrew)

* New translations automation.properties (Slovenian)
2022-08-03 18:03:28 +02:00
openhab-bot
d92a2c6945
New Crowdin updates (#3028)
* New translations units.properties (Portuguese)

* New translations DefaultSystemChannels.properties (Norwegian)

* New translations tags.properties (Norwegian)

* New translations SystemProfiles.properties (Norwegian)

* New translations audio.properties (Norwegian)

* New translations voice.properties (Norwegian)

* New translations ephemeris.properties (Norwegian)

* New translations inbox.properties (Norwegian)

* New translations restauth.properties (Norwegian)

* New translations addons.properties (Norwegian)

* New translations persistence.properties (Norwegian)

* New translations jsonStorage.properties (Norwegian)

* New translations chart.properties (Norwegian)

* New translations i18n.properties (Norwegian)

* New translations network.properties (Norwegian)

* New translations lsp.properties (Norwegian)

* New translations sitemap.properties (Norwegian)

* New translations hli.properties (Norwegian)

* New translations marketplace.properties (Norwegian)

* New translations magic.properties (Norwegian)

* New translations validation.properties (Norwegian)

* New translations SystemThingStatusInfos.properties (Norwegian)

* New translations units.properties (Portuguese, Brazilian)
2022-07-04 15:31:54 +02:00
Kai Kreuzer
61fd47c853
Apply spotless and resolver (#3018)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-27 13:41:28 +02:00
openhab-bot
8944bdbbe4 [unleash-maven-plugin] Preparation for next development cycle. 2022-06-26 16:37:00 +00:00
J-N-K
013e317b6b
Log the remote address of failed login attempts (#2800)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-26 10:00:00 +01:00
Wouter Born
3d7be0ffa7
Avoid throwing raw exception types (#2747)
* Avoid throwing raw exception types

This fixes all 36 AvoidThrowingRawExceptionTypes SAT findings.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-14 16:14:25 +01:00
Christoph Weitkamp
cabb3f7315
Update license headers to 2022 (#2671)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-07 13:16:42 +01:00
Kai Kreuzer
e3b07782b4
pom reference update from http to https (#2644)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-23 22:55:20 +01:00
Kai Kreuzer
1ebf7395d9 Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-20 06:59:22 +01:00
openhab-bot
5ac05c4968 [unleash-maven-plugin] Preparation for next development cycle. 2021-12-19 21:49:34 +00:00
openhab-bot
de7b176dc4
New Crowdin updates (#2609)
* New translations addons.properties (Italian)
* New translations brokerConnectionInstance.properties (Italian)
* New translations i18n.properties (Italian)
* New translations inbox.properties (Italian)
* New translations marketplace.properties (German)
* New translations marketplace.properties (Hebrew)
* New translations marketplace.properties (Hungarian)
* New translations marketplace.properties (Italian)
* New translations restauth.properties (Italian)
* New translations tags.properties (Italian)
* New translations tags.properties (Polish)
* New translations validation.properties (Italian)
2021-12-15 22:14:37 +01:00
Wouter Born
bb97d85d3b
Fix ConcurrentModificationException in ExpiringUserSecurityContextCache (#2579)
The issue occurs when expired entries are removed from the cache.
Also adds some unit tests in which the same issue could be reproduced.

Fixes #2528

Signed-off-by: Wouter Born <github@maindrain.net>
2021-11-26 23:06:34 +01:00
openhab-bot
cffdcd04b3
New Crowdin updates (#2515)
* New translations brokerConnectionInstance.properties (Russian)
* New translations DefaultSystemChannels.properties (Russian)
* New translations firmware.properties (Russian)
* New translations inbox.properties (Russian)
* New translations LanguageSupport.properties (Russian)
* New translations restauth.properties (Russian)
* New translations SystemProfiles.properties (Russian)
* New translations tags.properties (Russian)
* New translations voice.properties (Russian)
2021-10-12 19:01:49 +02:00
openhab-bot
11a96d87d6
New Crowdin updates (#2506)
* New translations addons.properties (Czech)
* New translations audio.properties (Czech)
* New translations brokerConnectionInstance.properties (Czech)
* New translations chart.properties (Czech)
* New translations DefaultSystemChannels.properties (Czech)
* New translations ephemeris.properties (Czech)
* New translations hli.properties (Czech)
* New translations i18n.properties (Czech)
* New translations inbox.properties (Czech)
* New translations jsonStorage.properties (Czech)
* New translations lsp.properties (Czech)
* New translations marketplace.properties (Czech)
* New translations marketplace.properties (Dutch)
* New translations marketplace.properties (Ukrainian)
* New translations network.properties (Czech)
* New translations persistence.properties (Czech)
* New translations restauth.properties (Czech)
* New translations sitemap.properties (Czech)
* New translations SystemProfiles.properties (Czech)
* New translations tags.properties (Czech)
* New translations voice.properties (Czech)
2021-10-05 22:49:21 +02:00
Yannick Schaus
ff2f90684f
Rework system:restauth config parameters (#2477)
Following the discussion in #2476, I believe the order and "advanced" status of config parameters in API Security (`system:restauth`) should be changed.
This promotes "Implicit User Role" to a non-advanced option (even if it can break some clients, it is clearly stated in the description), and demotes "Allow Basic Authentication" to an advanced option (API Tokens can be used to authenticate to the API as a better alternative to Basic).

Signed-off-by: Yannick Schaus <github@schaus.net>
2021-09-06 08:34:33 +02:00
openhab-bot
95da7021d9
New Crowdin updates (#2431)
* New translations tags.properties (German)

* New translations sitemap.properties (Ukrainian)

* New translations network.properties (Italian)

* New translations hli.properties (Greek)

* New translations lsp.properties (Greek)

* New translations validation.properties (Greek)

* New translations units.properties (Greek)

* New translations messages.properties (Greek)

* New translations firmware.properties (Greek)

* New translations i18n.properties (Greek)

* New translations jsonStorage.properties (Greek)

* New translations persistence.properties (Greek)

* New translations addons.properties (Greek)

* New translations restauth.properties (Greek)

* New translations ephemeris.properties (Greek)

* New translations inbox.properties (Greek)

* New translations audio.properties (Greek)

* New translations sitemap.properties (Greek)

* New translations tags.properties (Greek)

* New translations DefaultSystemChannels.properties (Greek)

* New translations chart.properties (Greek)

* New translations network.properties (Greek)

* New translations voice.properties (Greek)

* New translations brokerConnectionInstance.properties (Greek)

* New translations LanguageSupport.properties (Greek)

* New translations SystemProfiles.properties (Greek)
2021-08-31 22:29:06 +02:00
Kai Kreuzer
5a667cc868 applied spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-27 23:22:02 +02:00
jenkins
b8d2077805 [unleash-maven-plugin] Preparation for next development cycle. 2021-06-27 15:50:02 +00:00
openhab-bot
8e3f87a212
New Crowdin updates (#2403)
* New translations network.properties (Swedish)

* New translations i18n.properties (Swedish)

* New translations inbox.properties (Swedish)

* New translations i18n.properties (Russian)

* New translations chart.properties (Swedish)

* New translations ephemeris.properties (Swedish)

* New translations DefaultSystemChannels.properties (Swedish)

* New translations firmware.properties (Swedish)

* New translations restauth.properties (Swedish)

* New translations jsonStorage.properties (Swedish)

* New translations voice.properties (Swedish)

* New translations LanguageSupport.properties (Swedish)

* New translations validation.properties (Swedish)

* New translations SystemProfiles.properties (Swedish)

* New translations hli.properties (Portuguese, Brazilian)

* New translations lsp.properties (Portuguese, Brazilian)

* New translations SystemProfiles.properties (Portuguese, Brazilian)

* New translations addons.properties (Portuguese, Brazilian)

* New translations persistence.properties (Portuguese, Brazilian)

* New translations jsonStorage.properties (Portuguese, Brazilian)

* New translations chart.properties (Portuguese, Brazilian)

* New translations voice.properties (Portuguese, Brazilian)

* New translations brokerConnectionInstance.properties (German)
2021-06-23 16:45:11 +02:00
openhab-bot
8dbed1c553
New Crowdin updates (#2395)
* New translations validation.properties (Arabic)

* New translations units.properties (Turkish)

* New translations network.properties (Chinese Simplified)

* New translations i18n.properties (Chinese Simplified)

* New translations audio.properties (Chinese Simplified)

* New translations validation.properties (Turkish)

* New translations persistence.properties (Chinese Simplified)

* New translations voice.properties (Chinese Simplified)

* New translations chart.properties (Chinese Simplified)

* New translations jsonStorage.properties (Chinese Simplified)

* New translations addons.properties (Chinese Simplified)

* New translations restauth.properties (Chinese Simplified)

* New translations ephemeris.properties (Chinese Simplified)

* New translations inbox.properties (Chinese Simplified)

* New translations brokerConnectionInstance.properties (Chinese Simplified)

* New translations lsp.properties (Chinese Simplified)

* New translations hli.properties (Chinese Simplified)

* New translations DefaultSystemChannels.properties (Chinese Simplified)

* New translations LanguageSupport.properties (Chinese Simplified)

* New translations messages.properties (Chinese Simplified)

* New translations validation.properties (Chinese Simplified)

* New translations units.properties (Chinese Simplified)

* New translations units.properties (Arabic)

* New translations firmware.properties (Chinese Simplified)

* New translations SystemProfiles.properties (Chinese Simplified)

* New translations ephemeris.properties (Spanish)

* New translations i18n.properties (Spanish)

* New translations voice.properties (Spanish)

* New translations addons.properties (Spanish)

* New translations tags.properties (Chinese Simplified)

* New translations units.properties (Swedish)

* New translations audio.properties (Swedish)

* New translations brokerConnectionInstance.properties (Ukrainian)

* New translations SystemProfiles.properties (Ukrainian)
2021-06-09 22:09:51 +02:00
openhab-bot
a52bb42481
New Crowdin updates (#2390)
* New translations network.properties (French)

* New translations restauth.properties (French)
2021-05-30 10:15:05 +02:00
openhab-bot
0ffb5aad72
New Crowdin updates (#2387)
* New translations restauth.properties (French)

* New translations i18n.properties (French)

* New translations network.properties (French)
2021-05-30 08:10:24 +02:00
openhab-bot
e2511cd894
New Crowdin updates (#2375)
* New translations persistence.properties (French)

* New translations lsp.properties (French)

* New translations jsonStorage.properties (French)

* New translations chart.properties (French)

* New translations SystemProfiles.properties (Hebrew)

* New translations SystemProfiles.properties (Italian)

* New translations SystemProfiles.properties (German)

* Update source file SystemProfiles.properties

* New translations SystemProfiles.properties (German)

* New translations SystemProfiles.properties (Dutch)

* New translations SystemProfiles.properties (Finnish)

* New translations audio.properties (Polish)

* New translations lsp.properties (Polish)

* New translations hli.properties (Polish)

* New translations persistence.properties (Polish)

* New translations network.properties (Polish)

* New translations i18n.properties (Polish)

* New translations chart.properties (Polish)

* New translations jsonStorage.properties (Polish)

* New translations addons.properties (Polish)

* New translations restauth.properties (Polish)

* New translations ephemeris.properties (Polish)

* New translations voice.properties (Polish)

* New translations inbox.properties (Polish)

* New translations inbox.properties (Hungarian)

* New translations ephemeris.properties (Hungarian)

* New translations restauth.properties (Hungarian)

* New translations addons.properties (Hungarian)

* New translations jsonStorage.properties (Hungarian)

* New translations voice.properties (Hungarian)

* New translations i18n.properties (Hungarian)

* New translations lsp.properties (Hungarian)

* New translations brokerConnectionInstance.properties (Hungarian)

* New translations hli.properties (Hungarian)

* New translations inbox.properties (French)

* New translations addons.properties (French)

* New translations audio.properties (French)

* New translations SystemProfiles.properties (Hungarian)

* New translations SystemProfiles.properties (Polish)

* New translations ephemeris.properties (French)
2021-05-27 17:44:29 +02:00
openhab-bot
ff1d702f5d
New Crowdin updates (#2352)
* New translations audio.properties (Hungarian)
* New translations audio.properties (Portuguese, Brazilian)
* New translations brokerConnectionInstance.properties (Dutch)
* New translations brokerConnectionInstance.properties (Finnish)
* New translations brokerConnectionInstance.properties (Hebrew)
* New translations brokerConnectionInstance.properties (Italian)
* New translations brokerConnectionInstance.properties (Ukrainian)
* New translations chart.properties (Hungarian)
* New translations ephemeris.properties (Portuguese, Brazilian)
* New translations hli.properties (Ukrainian)
* New translations i18n.properties (Portuguese, Brazilian)
* New translations inbox.properties (Portuguese, Brazilian)
* New translations lsp.properties (Ukrainian)
* New translations network.properties (Hungarian)
* New translations network.properties (Portuguese, Brazilian)
* New translations persistence.properties (Hungarian)
* New translations restauth.properties (Portuguese, Brazilian)
2021-05-12 18:59:30 +02:00
openhab-bot
305683ac6a
New Crowdin updates (#2339)
* New translations restauth.properties (Hebrew)

* New translations addons.properties (Hebrew)

* New translations jsonStorage.properties (Hebrew)

* New translations chart.properties (Hebrew)

* New translations DefaultSystemChannels.properties (Polish)

* New translations LanguageSupport.properties (Polish)

* New translations audio.properties (Polish)

* New translations voice.properties (Polish)

* New translations SystemProfiles.properties (Polish)

* New translations units.properties (Polish)

* New translations validation.properties (Polish)

* New translations validation.properties (Finnish)

* New translations messages.properties (Polish)

* New translations tags.properties (Polish)

* New translations firmware.properties (Polish)

* New translations chart.properties (Polish)

* New translations inbox.properties (Polish)

* New translations ephemeris.properties (Polish)

* New translations restauth.properties (Polish)

* New translations addons.properties (Polish)

* New translations persistence.properties (Polish)

* New translations jsonStorage.properties (Polish)

* New translations network.properties (Polish)

* New translations i18n.properties (Polish)

* New translations jsonStorage.properties (Finnish)

* New translations i18n.properties (Finnish)

* New translations network.properties (Finnish)

* New translations voice.properties (Dutch)

* New translations persistence.properties (Dutch)

* New translations addons.properties (Dutch)

* New translations restauth.properties (Dutch)

* New translations ephemeris.properties (Dutch)

* New translations inbox.properties (Dutch)

* New translations audio.properties (Dutch)

* New translations hli.properties (Dutch)

* New translations brokerConnectionInstance.properties (Dutch)

* New translations lsp.properties (Dutch)

* New translations jsonStorage.properties (Dutch)

* New translations chart.properties (Dutch)

* New translations i18n.properties (Dutch)

* New translations network.properties (Dutch)

* New translations DefaultSystemChannels.properties (Italian)

* New translations audio.properties (Ukrainian)

* New translations inbox.properties (Ukrainian)

* New translations restauth.properties (Ukrainian)

* New translations addons.properties (Ukrainian)

* New translations i18n.properties (Ukrainian)

* New translations network.properties (Ukrainian)

* New translations lsp.properties (Italian)

* New translations lsp.properties (German)

* New translations lsp.properties (Finnish)

* New translations lsp.properties (Hebrew)

* New translations hli.properties (German)

* New translations hli.properties (Finnish)

* New translations hli.properties (Hebrew)

* New translations hli.properties (Italian)

* New translations brokerConnectionInstance.properties (Italian)

* New translations brokerConnectionInstance.properties (Hebrew)

* New translations brokerConnectionInstance.properties (Finnish)

* New translations jsonStorage.properties (German)

* New translations jsonStorage.properties (Spanish)

* New translations network.properties (Spanish)

* New translations tags.properties (Italian)

* New translations voice.properties (Hebrew)

* New translations i18n.properties (Hebrew)

* New translations network.properties (Hebrew)

* New translations jsonStorage.properties (Hebrew)

* New translations chart.properties (Hebrew)

* New translations persistence.properties (Hebrew)

* New translations inbox.properties (Italian)

* New translations jsonStorage.properties (Finnish)

* New translations audio.properties (Finnish)

* New translations inbox.properties (Finnish)

* New translations ephemeris.properties (Finnish)

* New translations restauth.properties (Finnish)

* New translations addons.properties (Finnish)

* New translations persistence.properties (Finnish)

* New translations chart.properties (Finnish)

* New translations addons.properties (Hebrew)

* New translations voice.properties (Finnish)

* New translations i18n.properties (Finnish)

* New translations network.properties (Finnish)

* New translations audio.properties (Hebrew)

* New translations inbox.properties (Hebrew)

* New translations ephemeris.properties (Hebrew)

* New translations restauth.properties (Hebrew)

* New translations audio.properties (Italian)

* New translations ephemeris.properties (Italian)

* New translations restauth.properties (Italian)

* New translations network.properties (Italian)

* New translations addons.properties (Italian)

* New translations persistence.properties (Italian)

* New translations jsonStorage.properties (Italian)

* New translations chart.properties (Italian)

* New translations voice.properties (Italian)

* New translations i18n.properties (Italian)

* New translations i18n.properties (German)

* New translations restauth.properties (German)

* New translations addons.properties (German)

* New translations persistence.properties (German)

* New translations chart.properties (German)

* New translations voice.properties (German)

* New translations network.properties (German)

* New translations inbox.properties (German)

* New translations ephemeris.properties (German)

* New translations audio.properties (German)

* New translations voice.properties (Ukrainian)

* New translations ephemeris.properties (Ukrainian)

* New translations chart.properties (Ukrainian)

* New translations jsonStorage.properties (Ukrainian)

* New translations persistence.properties (Ukrainian)

* New translations voice.properties (German)
2021-05-05 21:09:31 +02:00
Wouter Born
7579aa4d31
Fix more SAT findings and add a few suppressions (#2335)
* Fix more SAT findings and add a few suppressions

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-05 20:59:59 +02:00
Christoph Weitkamp
31494c0d8a
Added i18n feature for ConfigurableServices (#2333)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-05 01:19:23 +02:00
openhab-bot
f2bf0a26c9
New Crowdin updates (#2326)
* New translations DefaultSystemChannels.properties (Hebrew)

* New translations addons.properties (German)

* New translations voice.properties (German)

* New translations chart.properties (German)

* New translations persistence.properties (German)

* New translations ephemeris.properties (German)

* New translations inbox.properties (German)

* New translations audio.properties (German)

* New translations DefaultSystemChannels.properties (Portuguese, Brazilian)

* New translations voice.properties (German)

* New translations messages.properties (Ukrainian)

* New translations addons.properties (Ukrainian)

* New translations restauth.properties (Ukrainian)

* New translations ephemeris.properties (Ukrainian)

* New translations inbox.properties (Ukrainian)

* New translations audio.properties (Ukrainian)

* New translations jsonStorage.properties (Ukrainian)

* New translations persistence.properties (Ukrainian)

* New translations chart.properties (Ukrainian)

* New translations i18n.properties (Ukrainian)

* New translations network.properties (Ukrainian)

* New translations audio.properties (Dutch)

* New translations inbox.properties (Dutch)

* New translations ephemeris.properties (Dutch)

* New translations restauth.properties (Dutch)

* New translations addons.properties (Dutch)

* New translations persistence.properties (Dutch)

* New translations chart.properties (Dutch)

* New translations jsonStorage.properties (Dutch)

* New translations voice.properties (Dutch)

* New translations voice.properties (Ukrainian)

* New translations i18n.properties (Dutch)

* New translations network.properties (Dutch)

* New translations persistence.properties (Finnish)

* New translations addons.properties (Finnish)

* New translations ephemeris.properties (Finnish)

* New translations audio.properties (Italian)

* New translations inbox.properties (Italian)

* New translations ephemeris.properties (Italian)

* New translations voice.properties (Italian)

* New translations addons.properties (Italian)

* New translations restauth.properties (Italian)

* New translations firmware.properties (Luxembourgish)

* New translations firmware.properties (Italian)

* New translations messages.properties (Luxembourgish)

* New translations tags.properties (Finnish)

* New translations units.properties (Finnish)

* New translations validation.properties (Italian)

* New translations LanguageSupport.properties (Italian)

* New translations persistence.properties (Italian)

* New translations chart.properties (Italian)

* New translations jsonStorage.properties (Italian)

* New translations network.properties (Italian)

* New translations i18n.properties (Italian)

* New translations i18n.properties (Portuguese, Brazilian)

* New translations network.properties (Portuguese, Brazilian)

* New translations voice.properties (Portuguese, Brazilian)

* New translations chart.properties (Portuguese, Brazilian)

* New translations jsonStorage.properties (Portuguese, Brazilian)

* New translations persistence.properties (Portuguese, Brazilian)

* New translations restauth.properties (Portuguese, Brazilian)

* New translations addons.properties (Portuguese, Brazilian)

* New translations ephemeris.properties (Portuguese, Brazilian)

* New translations inbox.properties (Portuguese, Brazilian)

* New translations audio.properties (Portuguese, Brazilian)

* New translations i18n.properties (German)

* New translations network.properties (German)

* New translations jsonStorage.properties (German)

* New translations restauth.properties (German)
2021-04-30 18:19:50 +02:00
Christoph Weitkamp
93d7973b56
[i18n] Translation of configurable services (#2306)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-29 15:20:55 +02:00
Wouter Born
05b7ec86f1
Fix new SAT findings (#2291)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-14 18:41:07 +02:00
spacemanspiff2007
4964b51160
Add cache for Basic Authentication (#2101)
Also-by: Sebastian Gerber <github@sgerber.de>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-03-30 22:55:26 +02:00
Wouter Born
b64c84e8b9
Fix wrong/missing OpenAPI ApiResponse content (#2258)
This fixes some issues where the response content is missing or wrong in the generated OpenAPI spec.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-27 13:28:47 +01:00
Wouter Born
774b9d607b
Update license headers to 2021 (#2041)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-01 16:43:46 +01:00
Wouter Born
bf14e1077f
Apply Spotless, resolve itest runbundles for 3.1.0 (#1982)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-22 10:01:42 +01:00
jenkins
965531696b [unleash-maven-plugin] Preparation for next development cycle. 2020-12-20 22:24:39 +00:00
Christoph Hofmann
bbede78dc9
Added operationIds for OpenAPI specification (#1861)
Signed-off-by: Christoph Hofmann <christoph@hofmann.pm>
2020-12-10 23:12:11 +01:00
Wouter Born
2f2bfde500
Remove Map null annotation workarounds (#1780)
These workarounds to prevent false positives can be removed now the EEAs allow for proper null analysis.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-03 22:12:22 +01:00
Wouter Born
0281c10036
[infrastructure] add external null-annotations (#1775)
Add EEAs and fix null analysis errors.

Related to:

* #888
* openhab/openhab-addons#8848

Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-03 21:33:48 +01:00
Yannick Schaus
3df4403268
[REST Auth] Clear session cookie only when deleting own session (#1758)
Fix https://github.com/openhab/openhab-webui/issues/441

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-10-25 19:52:12 +01:00
Yannick Schaus
8b52cab5ef
[REST Auth] API tokens & openhab:users console command (#1735)
This adds API tokens as a new credential type. Their format is:
`oh.<name>.<random chars>`

The "oh." prefix is used to tell them apart from a JWT access token,
because they're both used as a Bearer authorization scheme, but there
is no semantic value attached to any of the other parts.

They are stored hashed in the user's profile, and can be listed, added
or removed managed with the new `openhab:users` console command.

Currently the scopes are still not checked, but ultimately they could
be, for instance a scope of e.g. `user admin.items` would mean that the
API token can be used to perform user operations like retrieving info
or sending a command, _and_ managing the items, but nothing else -
even if the user has more permissions because of their role (which
will of course still be checked).

Tokens are normally passed in the Authorization header with the Bearer
scheme, or the X-OPENHAB-TOKEN header, like access tokens.
As a special exception, API tokens can also be used with the Basic
authorization scheme, **even if the allowBasicAuth** option is not
enabled in the "API Security" service, because there's no additional
security risk in allowing that. In that case, the token should be
passed as the username and the password MUST be empty.

In short, this means that all these curl commands will work:
- `curl -H 'Authorization: Bearer <token>' http://localhost:8080/rest/inbox`
- `curl -H 'X-OPENHAB-TOKEN: <token>' http://localhost:8080/rest/inbox`
- `curl -u '<token>[:]' http://localhost:8080/rest/inbox`
- `curl http://<token>@localhost:8080/rest/inbox`

2 REST API operations were adding to the AuthResource, to allow
authenticated users to list their tokens or remove (revoke) one.
Self-service for creating a token or changing the password is more
sensitive so these should be handled with a servlet and pages devoid
of any JavaScript instead of REST API calls, therefore for now they'll
have to be done with the console.

This also fixes regressions introduced with #1713 - the operations
annotated with @RolesAllowed({ Role.USER }) only were not authorized
for administrators anymore.

* Generate a unique salt for each token

Reusing the password salt is bad practice, and changing the
password changes the salt as well which makes all tokens
invalid.

Put the salt in the same field as the hash (concatenated
with a separator) to avoid modifying the JSON DB schema.

* Fix API token authentication, make scope available to security context

The X-OPENHAB-TOKEN header now has priority over the Authorization
header to credentials, if both are set.

* Add self-service pages to change password & create new API token

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-10-25 12:04:40 +01:00
Wouter Born
b2c045d0fe
Fix build by wrapping lines (#1729)
Caused by #1713

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-19 11:42:26 +02:00
Yannick Schaus
e26c49b9bf
Allow basic authentication to authorize API access (#1713)
* Allow basic authentication to authorize API access

Closes #1699.

Note, this opens a minor security issue that allows an attacker
to brute force passwords by making calls to the API - contrary to
the authorization page, the credentials parsing for the REST API
is stateless & doesn't have a lock mechanism to lock user accounts
after too many failed login attempts.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-10-18 20:59:51 +02:00
Wouter Born
ab1fa65aa1
Improve JwtHelper exception handling (#1712)
Catch specific exceptions and don't log errors but instead add an appropriate message and preserve the stacktrace.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-11 10:03:39 +02:00
Yannick Schaus
426bd112b7
[REST/Auth] Always accept tokens in the alt header (#1631)
Currently the AuthFilter will try to find a token in the
X-OPENHAB-TOKEN HTTP header - only when it finds a cookie
named X-OPENHAB-AUTH-HEADER. It can cause problems because
browsers or proxies might block the cookie from being sent
for various reasons (for instance if there's a path set
for it).

There is no downside IMHO to always try to fallback to
checking the X-OPENHAB-TOKEN header for a token, if and
only if it's not already provided in the Authorization
header. It is the responsibility of the client to decide
how it wants to authorize the request among the available
options - by checking a cookie, or something else entirely.

Also removed the '?api_key=' option because Swagger UI
doesn't provide tokens that way anymore.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-09-09 20:48:10 +02:00
Wouter Born
29dfb967c4
Migrate to OpenAPI 3 annotations (#1576)
* Upgrade to Swagger 2.1.0
* Add missing root and events resources
* Fix wrong and add missing response implementations

Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-02 13:21:57 +02:00
Kai Kreuzer
0f134996f2
removed boot bundle (#1559)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-07-24 13:11:56 +02:00
Christoph Weitkamp
8808f04c30
Removed dependency on 'org.apache.commons.io' (#1441)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-21 15:17:00 +02:00