Skip to content
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

feat: Add support for apps as serviceresource #658

Merged
merged 6 commits into from
Apr 22, 2024

Conversation

elsand
Copy link
Collaborator

@elsand elsand commented Apr 21, 2024

In order to support app instances in the Dialogporten, we need to be able to refer to apps as service resources

Description

This adds support for urn:altinn:app in dialog validator and Altinn auth helpers, and changes the Resource Registry client to use the "resourcelist" endpoint, which includes Altinn 3 apps (unfortunately this also includes Altinn 2 services, which baloons the response size considerably, but this is filtered before storing to cache). The Fusion cache settings has been changed to reflect this (ie. increasing factory timeouts).

Yet to be fixed:

  • Handling of "ttd" services (the Digdir test organization). These contain an empty string as "organization" in the RR, where there usually is a organization number. Special code will be required to handle TTD service authorization and dialog.org population. Moved to Cannot create dialogs referring apps/resources owned by TTD #663
  • Handling of app instance delegations. Since app instance ids are a bit weird (has the form {partyId}/{instanceId}) we cannot just map the dialogId to urn:altinn:instance-id (like we do with resource id) as this will cause an exception in the PDP API. Preferably the PDP context handler should be able to deal with this, and map the missing partyId into the instance-id (since it needs to get the partyId for organizationnumbers/SSNs anyway) Moved to Not able to see actions granted by instance delegation on apps #664
  • Handling of resource constraints for app in the authorization requests for search. Currently we assume name of the resource to be unique, but an app-name may be reused between service owners. Edit: we include the reserved app_{org}_ prefix, avoiding this potential ambiguity.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • Documentation is updated (either in docs-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)

@elsand elsand requested a review from a team as a code owner April 21, 2024 10:40
@elsand elsand linked an issue Apr 21, 2024 that may be closed by this pull request
@elsand elsand changed the title Feature/add support for apps as serviceresource feat: Add support for apps as serviceresource Apr 21, 2024
Copy link

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@elsand elsand merged commit adf91ce into main Apr 22, 2024
16 checks passed
@elsand elsand deleted the feature/add-support-for-apps-as-serviceresource branch April 22, 2024 12:45
oskogstad pushed a commit that referenced this pull request May 7, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.6.0](v1.5.0...v1.6.0)
(2024-05-07)


### Features

* Add authorization caching
([#591](#591))
([2f86d7e](2f86d7e))
* Add GraphQL POC
([#636](#636))
([c779eac](c779eac))
* Add support for apps as serviceresource
([#658](#658))
([adf91ce](adf91ce))
* Authorized parties endpoint in enduser API
([#661](#661))
([050ccbb](050ccbb))


### Bug Fixes

* Accept app references with urn:altinn:resource prefix
([#685](#685))
([c9a5606](c9a5606))
* ensure performed by is set for activities
([#628](#628))
([1adf075](1adf075))
* Use HttpClient wrappers that ensure success to match FusionCache
expectations ([#684](#684))
([7c1e966](7c1e966))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support urn:altinn:app:<appid> as service resource
2 participants