Altinn / altinn-authorization

Altinn platform microservice for handling authorization
2 stars 4 forks source link

Attribute model from { Id, Value } to { Type, Value } #656

Open jonkjetiloye opened 10 months ago

jonkjetiloye commented 10 months ago

Description

The existing AttributeMatch model using the properties Id and Value have been identified as problematic and decided it should be refactored to use the property naming Type and Value.

This will however require a refactoring chores across repositories as it's already widely used, but so far only by our own implementations as external consumption of the APIs have not been opened widely yet.

Additional Information

Slack discussion.: https://altinndevops.slack.com/archives/CQPNM75L3/p1704368339145839

Tasks

Refactoring chores (and order of roll-out?)

- [ ] https://github.com/Altinn/altinn-resource-registry/issues/325
- [ ] https://github.com/Altinn/altinn-access-management/issues/578
- [ ] Access Management BFF & Frontend: AttributeMatch
- [ ] Altinn 2: AttributeMatchExternal in integrations with AM API (Optional)

Acceptance Criterias

All APIs using the old Id and Value Attribute model in input or output models should now use Type and Value. Roll-out of the change should be coordinated to cause the least amount of down-time

Example old model:

"authorizationReference": [
      {
        "id": "urn:altinn:org",
        "value": "ttd"
      },
      {
        "id": "urn:altinn:app",
        "value": "app-build-test"
      }
    ]

Example new model:

"authorizationReference": [
      {
        "type": "urn:altinn:org",
        "value": "ttd"
      },
      {
        "type": "urn:altinn:app",
        "value": "app-build-test"
      }
    ]
annerisbakk commented 6 months ago

@jonkjetiloye Er dette teknisk gjeld? Noe Team Tilgangsinfo skal gjøre?

annerisbakk commented 5 months ago

@jonkjetiloye Skal dette være en Epic for begge teamene ift å samle opp teknisk gjeld? Hvis ja, bør overskriften gjenspeile det :)