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

Identity dupe resolution guide first draft #29308

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

banks
Copy link
Member

@banks banks commented Jan 7, 2025

Description

First draft of the Idenity duplicate resolution docs. The features described are not all merged yet but this document is so important we want to start getting feedback on it ASAP.

TODO only if you're a HashiCorp employee

  • Backport Labels: If this fix needs to be backported, use the appropriate backport/ label that matches the desired release branch. Note that in the CE repo, the latest release branch will look like backport/x.x.x, but older release branches will be backport/ent/x.x.x+ent.
    • LTS: If this fixes a critical security vulnerability or severity 1 bug, it will also need to be backported to the current LTS versions of Vault. To ensure this, use all available enterprise labels.
  • ENT Breakage: If this PR either 1) removes a public function OR 2) changes the signature
    of a public function, even if that change is in a CE file, double check that
    applying the patch for this PR to the ENT repo and running tests doesn't
    break any tests. Sometimes ENT only tests rely on public functions in CE
    files.
  • Jira: If this change has an associated Jira, it's referenced either
    in the PR description, commit message, or branch name.
  • RFC: If this change has an associated RFC, please link it in the description.
  • ENT PR: If this change has an associated ENT PR, please link it in the
    description. Also, make sure the changelog is in this PR, not in your ENT PR.

@banks banks added this to the 1.19.0-rc milestone Jan 7, 2025
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Jan 7, 2025
@digital-content-events
Copy link

📄 Content Checks

Updated: Tue, 07 Jan 2025 17:04:30 GMT

Found 3 error(s)

content/docs/upgrading/identity-deduplication.mdx

Position Description Rule
137:5-138:117 Unexpected fully-qualified link to developer.hashicorp.com: https://developer.hashicorp.com/vault/api-docs/secret/identity/entity-alias#delete-entity-alias-by-id. Replace with a relative path internal to Developer. Possibly: /vault/api-docs/secret/identity/entity-alias#delete-entity-alias-by-id. ensure-valid-link-format
233:12-234:22 Unexpected folder-relative link found: . Ensure this link is an absolute Developer path. ensure-valid-link-format

content/docs/upgrading/upgrade-to-1.19.x.mdx

Position Description Rule
58:55-58:75 Unexpected folder-relative link found: . Ensure this link is an absolute Developer path. ensure-valid-link-format

Copy link

github-actions bot commented Jan 7, 2025

CI Results:
All Go tests succeeded! ✅


# Vault identity duplicate resolution guide

Some users may have duplicate identity resources (entities, aliases, groups) in
Copy link
Collaborator

@digivava digivava Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about linking the word "identity" to the introductory identity docs page, so that people who come to this page from the 1.19 upgrade guide and aren't very familiar with entities/aliases/groups can do some initial reading to remind themselves what these things are first before they continue.


```
[WARN] identity: 2 different-case entity alias duplicates found (potential security risk)
[WARN] identity: entity-alias "alias-case" with mount accessor "auth_userpass_34aca7ec" duplicates 1 others: id=df3568a4-3b65-4104-9481-1129ecbed72f canonical_id=5f013d99-a6c7-9a00-6ad5-4ad724b14f60 force_deduplication="would merge into entity 7da76b0d-fe9b-a125-3362-2a8ff055dcf8"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question: Feel free to take this offline as it's not related to this PR and probably more to my overall noobery, but I'm just curious what a canonical ID is vs the regular ID. In this example log line I was first trying to find the corresponding entity 7da7 and didn't realize it was the canonical_id I was supposed to be looking at, not the id.

Is there a way for users to query identity resources by canonical ID to inspect them, and see "aha, they're right, it's merged"? Or can you only query by id? I'm just curious from a UX perspective.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah it's a detail that's maybe only clear if you know the API a bit - canonical_id is what we call the field of an alias that stores the ID of the entity it's aliasing. If you think in SQL then it's like aliases JOIN entities ON aliases.canonical_id = entities.id. So when we output a line about an alias dupe canonical_id means "the entity this alias points to". See https://developer.hashicorp.com/vault/api-docs/secret/identity/entity-alias#canonical_id

the cluster that reports them is a Performance Replication secondary, you will
need to perform any resolution steps necessary against that cluster and not the
Primary.

Copy link
Collaborator

@digivava digivava Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens to same-case entity alias duplicates? I don't see a section for that. Is it so simple that it can be covered right away before jumping into all these different-case scenarios? Or is there no such thing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I left it out because it's nuanced: basically those are already auto-merged. I've alluded to the alias merging in a few places but was kinda trying to avoid spelling out the complicated history of that here for brevity. I guess it's a natural question though so I'll see if I can work in a simple statement to indicate that they won't been found without going into the details.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in Aarah's restructure this isn't exactly dealt with but is less of an issue as it's more split up into specific trouble shooting guides. It still seems cumbersome to find a place to explain why not other types so I think her structure is sufficient to guide the user through without the extra background.

or group by name. Simply changing the reference to use the new name is the
simplest resolution.

### Activating the `force-identity-deduplication` flag
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it was said somewhere way up above, but once you write this part I think it might be good to make sure there's another warning here that this is a one-time thing, so they should review the resolution information for their relevant duplicate types above before activating the flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants