547 convers the epic of supporting send conditions in notifications. A part of this is to send requests to the provided send condition endpoint through an API client evaluate the send condition using the condition client before generating a notification (?) / before sending a notification
Client should use maskin porten with scope altinn:system/notifications.condition.check to authenticate towards the endpoints
Consideration
How should the maskinporten secrets be handled? Added to kv directly, added to tf kv or manually?
Refinement: Added to platform keyvault and distributed out to environments with terraform
REST client and formats
Client request format: GET to endpoint specified in order.
Authorization header with bearer token (maskinporten token representing digdir with scope: altinn:system/notifications.condition.check)
Expected response format :SendConditionResponse
{
"sendNotification" : true
}
Client should return a Result--object. Result<bool, clientError>.
Client error object will need to be defined. And service can decide on how to handle the error.
ConditionClientError
{
"resultCode": "",
"errorMessage": ""
}
Tasks
[x] Define and set up a new scope in maskinporten to be used by the Notifications integration in test & prod
[x] Create a designated maskinporten integration in both test & prod
[x] Add mp client secrets to tf kv and define secrets in terraform script. PR
[x] Update relevant seources with secrets and expiry dates
[x] Implement a conditionClient + interface that takes an endpoint as input and sends a request including the Maskinporten token.
[x] Set up a private endpoint for internal condition check to support testing ala webhook receiver in events. The endpoint respons should be controllable with a parameter.
[x] Altinn/altinn-platform#815
[x] deploy updated swagger
[x] QA
[x] Test
[x] Documentation
[x] Update Architecture drawing
[x] Update dependencies
Acceptance Criterias
[x] A client is made available to services in notification for requesting the result of a send condition.
[x] Requests sent by the condition client include a bearer token with the maskinporten scope altinn:system/notifications.condition.check representing Digdir
Description
547 convers the epic of supporting send conditions in notifications. A part of this is to send requests to the provided send condition endpoint through an API client evaluate the send condition using the condition client before generating a notification (?) / before sending a notification
Client should use maskin porten with scope altinn:system/notifications.condition.check to authenticate towards the endpoints
Consideration
Specification
Maskinporten integration scope:
altinn:system/notifications.condition.check
integration name:notifications condition check
REST client and formats Client request format: GET to endpoint specified in order. Authorization header with bearer token (maskinporten token representing digdir with scope:
altinn:system/notifications.condition.check
)Expected response format :SendConditionResponse
Client should return a Result--object. Result<bool, clientError>. Client error object will need to be defined. And service can decide on how to handle the error.
ConditionClientError
Tasks
Acceptance Criterias
altinn:system/notifications.condition.check
representing Digdir