Skip to content

Conversation

beagins
Copy link
Contributor

@beagins beagins commented Apr 18, 2025

Description

ℹ️ This branch is merging into a feature side branch (not main)
ℹ️ The current implementation looks ugly, styling will be addressed in a separate PR
  • Enable search for updated namespace picker
  • Conditionally show root in list of namespaces
  • Enterprise tests passing ✅

    239 tests completed in 168817 milliseconds, with 0 failed, 10 skipped, and 0 todo.
    1449 assertions of 1449 passed, 0 failed.

Demo

Screen.Recording.2025-04-17.at.7.18.51.PM.mov

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.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Apr 18, 2025
Copy link

github-actions bot commented Apr 18, 2025

CI Results:
All Go tests succeeded! ✅

@beagins beagins marked this pull request as ready for review April 18, 2025 02:23
@beagins beagins requested a review from a team as a code owner April 18, 2025 02:23
Copy link

github-actions bot commented Apr 18, 2025

Build Results:
All builds succeeded! ✅

...(namespace?.accessibleNamespaces || []).map((ns) => {
const parts = ns.split('/');
return { id: parts[parts.length - 1], path: ns, label: ns };
}),
];

// Conditionally add the root namespace
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious how this works in reality, is ''/root still returned from the LIST endpoint on HVD managed clusters?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't dig in too deep, I just stole this from the previous implementation, but I'll dig in a little to see what's going on & report back

Copy link
Contributor Author

@beagins beagins Apr 19, 2025

Choose a reason for hiding this comment

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

The auth service returns the following as authData

{
    "userRootNamespace":"",
    "displayName":"token",
    "backend":{
        "mountPath":"token",
        "type":"token",
        "typeDisplay":"Token",
        "description":"Token authentication.",
        "tokenPath":"id",
        "displayNamePath":"display_name",
        "formAttributes":["token"]
    },
    "token":"root",
    "policies":["root"],
    "renewable":false,
    "entity_id":"",
    "tokenExpirationEpoch":null
}

I'm guessing - and would like to figure out how to confirm this - that userRootNamespace would be "admin" for a HVD user

I tried creating a user, bob, w/o access to root namespace to see the value of userRootNamespace when bob logs in, but it looks like bob still has access to root, which is consistent with when I log in as bob on http://localhost:8200/ so it's likely that I'm configuring the policy incorrectly

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah this can definitely wait until smoke testing at the end, I meant to call that out in my comment. Just sent you a slack about stubbing HVD 😄

@beagins beagins force-pushed the VAULT-34216/namespace-picker-feature-branch branch from 882c861 to 4870a1a Compare April 19, 2025 00:25
@beagins beagins requested a review from a team as a code owner April 19, 2025 00:25
@beagins beagins requested review from blueberry-pi and removed request for a team April 19, 2025 00:25
@beagins beagins force-pushed the VAULT-34216/enable-search branch 5 times, most recently from a0687c6 to a145428 Compare April 21, 2025 23:59
@beagins beagins force-pushed the VAULT-34216/namespace-picker-feature-branch branch from 4870a1a to 4e2897e Compare April 22, 2025 18:17
@beagins beagins force-pushed the VAULT-34216/enable-search branch from a145428 to 1661810 Compare April 22, 2025 18:18
@beagins beagins merged commit 7f2606c into VAULT-34216/namespace-picker-feature-branch Apr 22, 2025
25 checks passed
@beagins beagins deleted the VAULT-34216/enable-search branch April 22, 2025 20:42
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.

3 participants