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

Change usage of double colon to single colon for scalar structured identifiers #700

Closed
2 of 5 tasks
oskogstad opened this issue May 7, 2024 · 2 comments
Closed
2 of 5 tasks
Assignees
Labels
enhancement New feature or request

Comments

@oskogstad
Copy link
Collaborator

oskogstad commented May 7, 2024

Introduction

There's currently a disparity between "party" and "serviceResource" encoding.

    "serviceResource": "urn:altinn:resource:super-simple-service",
    "party": "urn:altinn:organization:identifier-no::310702749",

The rest of Altinn is using a single colon, and treating the last item as the value within the NSS-part of the URN in scenarios where we need to split this into eg. XACML attribute ids and values. Using a single colon is also more in line with typical NSS-usage (see examples on the wikipedia-page).

If we for some reason need to have a literal colon as the value, it should be percent-escaped, but no known case for this currently exists so code for this (handling escaping) should not be added at this time.

Tasks

Preview Give feedback
@elsand
Copy link
Member

elsand commented May 9, 2024

I've grown ambivalent to the whole double colon thing. While it provides a fairly robust way of splitting namespace from value in a scalar string, it's a bit unorthodox and not really used anywhere else (not even in Altinn). We should consider keeping this being a single colon, and always consider the last element when splitting by ":" to be the value, and expect any literal colons within the value to be URL encoded (ie %3A). Thoughts?

@elsand
Copy link
Member

elsand commented May 13, 2024

I've discussed this briefly with @altinnadmin, and we want to change this back to using just a single colon. Ie. splitting logic will have to change from splitting on "::" to splitting on a single colon and treat the last item as the value. I'll go ahead and change this issue to reflect this.

@elsand elsand changed the title ServiceResource URI does not use double :: Change usage of double colon to single colon for scalar structured identifiers May 13, 2024
@elsand elsand removed the needs consideration Requires additional consideration label May 13, 2024
@knuhau knuhau self-assigned this May 16, 2024
oskogstad added a commit that referenced this issue May 21, 2024
<!--- Provide a general summary of your changes in the Title above -->

## Description
Change party identifier separator to single colon

<!--- Describe your changes in detail -->

## Related Issue(s)

- #700 

## Verification

- [x] **Your** code builds clean without any errors or warnings
- [x] 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.](https://github.com/Altinn/altinn-studio-docs), if
applicable)

Co-authored-by: Ole Jørgen Skogstad <skogstad@softis.net>
@elsand elsand closed this as completed Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants