-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support user consent flow #1293
Support user consent flow #1293
Conversation
Can one of the admins verify this patch? |
Signed-off-by: Stanislav Trailov <[email protected]> Signed-off-by: Michael Herdt <[email protected]> Signed-off-by: Dimitar Shterev <[email protected]> Signed-off-by: Shruthi Manavalli Ramanna <[email protected]>
513d9a7
to
82f91e2
Compare
Signed-off-by: Michael Herdt <[email protected]>
Signed-off-by: Michael Herdt <[email protected]>
…s when configuring auto-confirmation. Signed-off-by: Michael Herdt <[email protected]>
Signed-off-by: Michael Herdt <[email protected]>
User consent fix permissions
Signed-off-by: Michael Herdt <[email protected]>
Signed-off-by: Michael Herdt <[email protected]>
Signed-off-by: Michael Herdt <[email protected]>
Signed-off-by: Michael Herdt <[email protected]>
Signed-off-by: Michael Herdt <[email protected]>
Extend integration test cases for DMF and DDI
} | ||
|
||
@Override | ||
public AutoConfirmationStatus activateAutoConfirmation(final String controllerId, final String initiator, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't @Transactional
missing here to override the class level annotation @Transactional(readOnly = true)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added here and in other relevant places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Transactional
is only required for methods that do some write operations. getStatus
, findActiveActionsWaitingConfirmation
do not require it because they get @Transactional(readOnly = true)
from the class JpaConfirmationManagement
itself
...pository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaConfirmationManagement.java
Show resolved
Hide resolved
...pository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaConfirmationManagement.java
Show resolved
Hide resolved
...pository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaConfirmationManagement.java
Outdated
Show resolved
Hide resolved
hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/SpServerError.java
Outdated
Show resolved
Hide resolved
.../src/main/resources/db/migration/POSTGRESQL/V1_12_24__add_confirmation_flag___POSTGRESQL.sql
Outdated
Show resolved
Hide resolved
.../src/main/resources/db/migration/POSTGRESQL/V1_12_24__add_confirmation_flag___POSTGRESQL.sql
Outdated
Show resolved
Hide resolved
.../src/main/resources/db/migration/POSTGRESQL/V1_12_24__add_confirmation_flag___POSTGRESQL.sql
Outdated
Show resolved
Hide resolved
.../src/main/resources/db/migration/POSTGRESQL/V1_12_24__add_confirmation_flag___POSTGRESQL.sql
Outdated
Show resolved
Hide resolved
...epository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/ControllerManagementTest.java
Outdated
Show resolved
Hide resolved
…pdates on closed actions. Signed-off-by: Michael Herdt <[email protected]>
...bit-rest-core/src/main/java/org/eclipse/hawkbit/rest/exception/ResponseExceptionHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Michael Herdt <[email protected]>
Signed-off-by: Michael Herdt <[email protected]>
Signed-off-by: Michael Herdt <[email protected]>
Signed-off-by: Michael Herdt <[email protected]>
Signed-off-by: Michael Herdt <[email protected]>
# Conflicts: # hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaControllerManagement.java # hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaDeploymentManagement.java # hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaAction.java # hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/RolloutManagementTest.java # hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/target/MgmtTarget.java # hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtRolloutResource.java # hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetMapper.java # hawkbit-rest/hawkbit-rest-docs/src/test/java/org/eclipse/hawkbit/rest/documentation/AbstractApiRestDocumentation.java # hawkbit-rest/hawkbit-rest-docs/src/test/java/org/eclipse/hawkbit/rest/mgmt/documentation/TargetResourceDocumentationTest.java
Signed-off-by: Shruthi Manavalli Ramanna <[email protected]>
Signed-off-by: Shruthi Manavalli Ramanna <[email protected]>
Signed-off-by: Shruthi Manavalli Ramanna <[email protected]>
...kbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/ConfirmationManagement.java
Show resolved
Hide resolved
...kbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/ConfirmationManagement.java
Show resolved
Hide resolved
Signed-off-by: Shruthi Manavalli Ramanna <[email protected]>
# Conflicts: # hawkbit-rest/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtRolloutResourceTest.java
Signed-off-by: Shruthi Manavalli Ramanna <[email protected]>
Signed-off-by: Shruthi Manavalli Ramanna <[email protected]>
Signed-off-by: Shruthi Manavalli Ramanna <[email protected]>
Signed-off-by: Shruthi Manavalli Ramanna <[email protected]>
Signed-off-by: Shruthi Manavalli Ramanna <[email protected]>
Signed-off-by: Shruthi Manavalli Ramanna <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, great work! Thank you!
Introduction:
This pull requests extends the action state machine to introduce a new update flow where the confirmation of an action is required first, before processing with the deployment. Therefore a new action state called "WAIT_FOR_CONFIRMATION" will be introduced. The consent flow can be activated in the system configuration. By default, the update process is executed as usual.
To confirm an action the DDI or DMF API can be used. For the DDI, a new "confirmationBase" resource is introduced to get information about pending confirmations. An API reference (for actions awaiting the confirmation) will also be added when polling against the DDI controllerBase.
For the DMF a new "CONFIRM" message was introduced, informing the device about open confirmations.
Additionally, an "auto-confirm" state can be set on the device, to automatically confirm actions. A use case would be if the operator decides to automatically confirm actions for a specific device (e.g. test device). From the end-user perspective (device layer), there could be a wish to be up to date with the latest software state and give the confirmation for every future update (until revoked again). The "auto-confirm" state can be set by using the DDI, DMF or one of the Management layers (UI&API).
Additionally the operator can decide if the confirmation is required for each deployment. Several layers were adapted to support this:
Commiter:
@dimitar-shterev
@stanislav-trailov
@ramannas
@herdt-michael