There are still several references to v3/token (Norman) in Rancher Dashboard that need to be replaced with the v1/ext.cattle.io.tokens (Steve) endpoint. The migration needs to maintain compatibility with Norman tokens until the API has been properly deprecated and support is removed.
Proposed solution
Acceptance Criteria
Additional details
We need to coordinate with team Collie on this change before bringing it in.
#16674 handled the migration of API Keys, but the change was later reverted via #16947. We need to reintroduce this change to complete the work.
Affected components
There are several areas confirmed to be using v3/token
|
// Old APIs via Norman |
|
// Base: /v3 |
|
export const NORMAN = { |
|
APP: 'app', |
|
AUTH_CONFIG: 'authconfig', |
|
CLUSTER: 'cluster', |
|
CLUSTER_TOKEN: 'clusterregistrationtoken', |
|
CLUSTER_ROLE_TEMPLATE_BINDING: 'clusterroletemplatebinding', |
|
CLOUD_CREDENTIAL: 'cloudcredential', |
|
FLEET_WORKSPACES: 'fleetworkspace', |
|
GLOBAL_ROLE: 'globalRole', |
|
GLOBAL_ROLE_BINDING: 'globalRoleBinding', |
|
|
|
NODE_POOL: 'nodePool', |
|
// Note - This allows access to node resources, not schema's or custom components (both are accessed via 'type' which clashes with kube node) |
|
NODE: 'node', |
|
PRINCIPAL: 'principal', |
|
PROJECT: 'project', |
|
PROJECT_ROLE_TEMPLATE_BINDING: 'projectroletemplatebinding', |
|
SETTING: 'setting', |
|
SPOOFED: { GROUP_PRINCIPAL: 'group.principal' }, |
|
ROLE_TEMPLATE: 'roleTemplate', |
|
TOKEN: 'token', |
|
USER: 'user', |
|
KONTAINER_DRIVER: 'kontainerDriver', |
|
NODE_DRIVER: 'nodeDriver' |
|
}; |
These include:
|
const tokens = await this.$store.dispatch('rancher/findAll', { type: NORMAN.TOKEN, opt: { watch: false } }); |
|
const tokens = await this.$store.dispatch('rancher/findAll', { |
|
type: NORMAN.TOKEN, |
|
opt: { |
|
// Ensure we have any new tokens since last fetched... and that we don't attempt to delete previously deleted tokens |
|
force: true |
|
} |
|
}); |
|
const canSeeTokens = this.$store.getters['rancher/schemaFor'](NORMAN.TOKEN, false, false); |
There are still several references to
v3/token(Norman) in Rancher Dashboard that need to be replaced with thev1/ext.cattle.io.tokens(Steve) endpoint. The migration needs to maintain compatibility with Norman tokens until the API has been properly deprecated and support is removed.Proposed solution
API Keyslist with newext.cattle.io.tokens#12332dashboard/shell/edit/token.vue
Lines 135 to 139 in faf01fc
dashboard/shell/pages/account/index.vue
Line 26 in faf01fc
Acceptance Criteria
Additional details
We need to coordinate with team Collie on this change before bringing it in.
#16674 handled the migration of API Keys, but the change was later reverted via #16947. We need to reintroduce this change to complete the work.
Affected components
There are several areas confirmed to be using
v3/tokendashboard/shell/config/types.js
Lines 12 to 38 in 6f7472d
These include:
dashboard/shell/components/Inactivity.vue
Line 127 in 6f7472d
dashboard/shell/components/form/ChangePassword.vue
Lines 275 to 281 in faf01fc
dashboard/shell/components/nav/Header.vue
Line 172 in faf01fc