Skip to content

Changes

Started 2 yr 4 mo ago
Took 1.9 sec
Introduce authorization checks in the Session API

* Include a configurable default fallback to allow all, allow authenticated only, or forbid all
* Apply as many checks as possible prior to accessing the gateway thread

Signed-off-by: Tim Ward <timothyjward@apache.org>
(commit: dab4465)
northbound/rest/src/test/java/org/eclipse/sensinact/northbound/rest/integration/ResourceAccessTest.java northbound/sensorthings/rest.gateway/src/test/java/org/eclipse/sensinact/sensorthings/sensing/rest/integration/AbstractIntegrationTest.java northbound/session/session-impl/src/test/java/org/eclipse/sensinact/nortbound/session/integration/SessionSubscribeTest.java northbound/session/session-impl/src/test/java/org/eclipse/sensinact/nortbound/session/impl/DefaultSessionAuthorizationEngineTests.java northbound/query-handler/src/test/java/org/eclipse/sensinact/northbound/query/test/integration/MissingEntityTest.java distribution/features/virtual-temperature-sensor-feature/src/it/resources/config/configuration.json northbound/rest/src/test/java/org/eclipse/sensinact/northbound/rest/integration/DescriptionsTest.java southbound/http/http-device-factory/src/test/java/org/eclipse/sensinact/gateway/southbound/http/factory/integration/HttpDeviceFactoryTest.java core/impl/src/main/java/org/eclipse/sensinact/core/command/impl/GatewayThreadImpl.java northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/SensiNactSessionImpl.java northbound/session/session-impl/pom.xml northbound/websocket/src/test/java/org/eclipse/sensinact/northbound/websocket/integration/SecureWebSocketTest.java northbound/query-handler/integration-test.bndrun northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/AllowAllAuthorizer.java pom.xml northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/DefaultAuthPolicy.java northbound/security/security-api/src/main/java/org/eclipse/sensinact/northbound/security/api/AuthorizationEngine.java northbound/websocket/src/test/java/org/eclipse/sensinact/northbound/websocket/integration/WebSocketTest.java southbound/http/http-device-factory/src/test/java/org/eclipse/sensinact/gateway/southbound/http/factory/integration/HttpDeviceFactoryParallelQueries.java northbound/rest/src/test/java/org/eclipse/sensinact/northbound/rest/integration/notification/ResourceNotificationsTest.java southbound/http/http-device-factory/integration-test.bndrun northbound/rest/src/main/java/org/eclipse/sensinact/northbound/rest/impl/RestAccessApplication.java northbound/query-handler/src/test/java/org/eclipse/sensinact/northbound/query/test/integration/DescriptionsTest.java northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/SessionManager.java southbound/http/http-device-factory/src/test/java/org/eclipse/sensinact/gateway/southbound/http/factory/integration/HttpDeviceFactoryAuthTest.java southbound/http/http-device-factory/src/test/java/org/eclipse/sensinact/gateway/southbound/http/factory/integration/HttpDeviceFactorySSLTest.java distribution/features/timescale-history-provider-feature/src/it/resources/config/configuration.json northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/DenyAllAuthorizer.java northbound/session/session-impl/src/test/java/org/eclipse/sensinact/nortbound/session/impl/TestUserInfo.java northbound/sensorthings/rest.gateway/src/test/java/org/eclipse/sensinact/sensorthings/sensing/rest/integration/ObservationHistoryTest.java northbound/session/session-impl/src/test/java/org/eclipse/sensinact/nortbound/session/integration/SensinactSessionTest.java northbound/query-handler/src/test/java/org/eclipse/sensinact/northbound/query/test/integration/ResourceAccessTest.java northbound/rest/src/test/java/org/eclipse/sensinact/northbound/rest/integration/SecureAccessTest.java northbound/rest/src/test/java/org/eclipse/sensinact/northbound/rest/integration/MissingEntityTest.java southbound/mqtt/mqtt-device-factory/src/test/java/org/eclipse/sensinact/gateway/southbound/mqtt/factory/integration/MqttDeviceFactoryTest.java core/impl/integration-test.bndrun southbound/virtual/virtual-temperature-sensor/integration-test.bndrun distribution/features/northbound-oidc-authenticator-feature/src/it/resources/config/configuration.json northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/DefaultSessionAuthorizationEngine.java southbound/virtual/virtual-temperature-sensor/src/test/java/org/eclipse/sensinact/gateway/southbound/virtual/temperature/integration/TemperatureSensorTest.java northbound/session/session-impl/integration-test.bndrun
timothyjward at
Lint checking fixes

Spacing tidy up and adding a missing license header

Signed-off-by: Tim Ward <timothyjward@apache.org>
(commit: a918712)
northbound/rest/src/test/java/org/eclipse/sensinact/northbound/rest/integration/ResourceAccessTest.java northbound/security/security-api/src/main/java/org/eclipse/sensinact/northbound/security/api/AuthorizationEngine.java northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/SessionManager.java core/impl/src/main/java/org/eclipse/sensinact/core/model/nexus/ModelNexus.java northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/AllowAllAuthorizer.java northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/DefaultAuthPolicy.java northbound/session/session-impl/src/test/java/org/eclipse/sensinact/nortbound/session/integration/SessionSubscribeTest.java northbound/sensorthings/rest.gateway/src/test/java/org/eclipse/sensinact/sensorthings/sensing/rest/integration/ObservationHistoryTest.java northbound/session/session-impl/src/test/java/org/eclipse/sensinact/nortbound/session/impl/TestUserInfo.java northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/DefaultSessionAuthorizationEngine.java northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/DenyAllAuthorizer.java northbound/sensorthings/rest.gateway/src/test/java/org/eclipse/sensinact/sensorthings/sensing/rest/integration/AbstractIntegrationTest.java core/api/src/main/java/org/eclipse/sensinact/core/twin/SensinactProvider.java northbound/session/session-impl/src/main/java/org/eclipse/sensinact/nortbound/session/impl/SensiNactSessionImpl.java distribution/features/virtual-temperature-sensor-feature/src/it/resources/config/configuration.json northbound/session/session-impl/src/test/java/org/eclipse/sensinact/nortbound/session/impl/DefaultSessionAuthorizationEngineTests.java core/impl/src/main/java/org/eclipse/sensinact/core/twin/impl/SensinactDigitalTwinImpl.java northbound/rest/src/test/java/org/eclipse/sensinact/northbound/rest/integration/SecureAccessTest.java northbound/session/session-impl/src/test/java/org/eclipse/sensinact/nortbound/session/integration/SensinactSessionTest.java
timothyjward at
Make the sensiNact build more CI friendly

Since Maven 3.5.0 poms have had the ability to be [CI-friendly](https://maven.apache.org/maven-ci-friendly.html) allowing a more flexible approach to releasing without the need to edit POM files. This also impacts the creation of our feature files, which can now flexibly alter the versions of the bundles they deploy to match what's being built in by CI. The end result should be a much simpler time when we want to tag or release any particular commit.

Signed-off-by: Tim Ward <timothyjward@apache.org>
(commit: 75ebfda)
distribution/assembly/pom.xml distribution/features/northbound-oidc-authenticator-feature/pom.xml core/geo-json/pom.xml examples/pull-based/pom.xml core/models/metadata/pom.xml northbound/sensorthings/filter/pom.xml northbound/pom.xml northbound/filters/pom.xml southbound/device-factory/pom.xml northbound/sensorthings/mqtt/pom.xml southbound/pom.xml core/emf-api/pom.xml northbound/rest/pom.xml distribution/features/northbound-ogc-sensorthings-feature/src/main/resources/northbound-ogc-sensorthings-feature.json southbound/http/http-device-factory/pom.xml northbound/sensorthings/pom.xml distribution/features/jakarta-servlet-whiteboard-feature/src/main/resources/jakarta-servlet-whiteboard-feature.json core/impl/pom.xml southbound/virtual/pom.xml northbound/sensorthings/rest.api/pom.xml northbound/session/pom.xml southbound/device-factory/parser-csv/pom.xml examples/push-based/pom.xml distribution/features/northbound-ogc-sensorthings-feature/pom.xml distribution/features/northbound-rest-feature/src/main/resources/northbound-rest-feature.json core/pom.xml examples/model-based/pom.xml distribution/features/jakarta-rest-whiteboard-feature/pom.xml northbound/session/session-api/pom.xml distribution/features/gogo-shell-feature/src/main/resources/gogo-shell-feature.json distribution/features/core-feature/pom.xml southbound/http/http-callback-whiteboard/pom.xml southbound/mqtt/mqtt-client/pom.xml examples/notification/pom.xml distribution/features/jakarta-rest-whiteboard-feature/src/main/resources/jakarta-rest-whiteboard-feature.json distribution/features/virtual-temperature-sensor-feature/src/main/resources/virtual-temperature-sensor-feature.json southbound/device-factory/device-factory-core/pom.xml distribution/features/northbound-websocket-feature/pom.xml northbound/security/security-api/pom.xml sensinact-bom/pom.xml distribution/launcher/pom.xml northbound/gogo-shell/pom.xml distribution/features/timescale-history-provider-feature/pom.xml southbound/mqtt/mqtt-device-factory/pom.xml northbound/security/openid-connect/pom.xml northbound/query-handler/pom.xml southbound/device-factory/parser-json/pom.xml examples/writable/pom.xml southbound/mqtt/pom.xml distribution/features/northbound-ogc-sensorthings-mqtt-feature/src/main/resources/northbound-ogc-sensorthings-mqtt-feature.json examples/pom.xml northbound/filters/filters.core/pom.xml pom.xml distribution/features/northbound-oidc-authenticator-feature/src/main/resources/northbound-oidc-authenticator-feature.json southbound/history/pom.xml core/models/provider/pom.xml distribution/features/gogo-shell-feature/pom.xml northbound/sensorthings/rest.gateway/pom.xml southbound/virtual/virtual-temperature-sensor/pom.xml northbound/sensorthings/dto/pom.xml distribution/features/northbound-ogc-sensorthings-mqtt-feature/pom.xml examples/generic/pom.xml southbound/history/history-api/pom.xml distribution/features/core-feature/src/main/resources/core-feature.json core/annotation/pom.xml distribution/pom.xml northbound/websocket/pom.xml northbound/filters/ldap/pom.xml southbound/http/pom.xml distribution/features/jakarta-servlet-whiteboard-feature/pom.xml distribution/features/northbound-websocket-feature/src/main/resources/northbound-websocket-feature.json distribution/features/virtual-temperature-sensor-feature/pom.xml examples/action/pom.xml examples/reflective/pom.xml core/models/pom.xml northbound/session/session-impl/pom.xml distribution/features/pom.xml core/api/pom.xml northbound/security/pom.xml distribution/features/northbound-rest-feature/pom.xml southbound/history/timescale-provider/pom.xml distribution/test-utils/pom.xml distribution/features/timescale-history-provider-feature/src/main/resources/timescale-history-provider-feature.json
timothyjward at