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

ui: DB Console shows "Insecure Mode" for secure clusters #93273

Closed
abarganier opened this issue Dec 8, 2022 · 0 comments · Fixed by #94021
Closed

ui: DB Console shows "Insecure Mode" for secure clusters #93273

abarganier opened this issue Dec 8, 2022 · 0 comments · Fixed by #94021
Assignees
Labels
A-observability-inf branch-release-22.2 Used to mark GA and release blockers, technical advisories, and bugs for 22.2 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.

Comments

@abarganier
Copy link
Contributor

abarganier commented Dec 8, 2022

Describe the problem

In v22.2, DB Console is showing "Insecure Mode" at the top right of the UI, even when the cluster is running in secure mode.

Screen Shot 2022-12-08 at 2 33 19 PM

Expected behavior
When DB Console is being served for a secure cluster, it should not indicate that it's running in insecure mode.

Environment:

  • CockroachDB version: v22.2.0

Jira issue: CRDB-22255

@abarganier abarganier added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-observability-inf labels Dec 8, 2022
@dhartunian dhartunian added release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. branch-release-22.2 Used to mark GA and release blockers, technical advisories, and bugs for 22.2 labels Dec 20, 2022
dhartunian added a commit to dhartunian/cockroach that referenced this issue Dec 20, 2022
Previous work that dynamically loaded the base ui data that we attach to
`Window` did not account for JS code which referenced the `dataFromServer`
variable directly in top-level consts. This led to a broken login widget in the
top right corner and docs links that would pin to "stable" versions instead of
the specific version link of the running cluster.

This commit does not completely fix the issue but it applies several
mitigations:

First, the redux store is now initialized with the loaded copy of the
`dataFromServer` info. This ensures that login information is initialized
properly. Second, the store is now constructed in the promise we define in
`index.tsx` instead of inline in the file in which it's defined, allowing us to
control execution ordering. Third, one of the `dataFromServer` usages in the
redux login selector is moved to be inside the selector to grab values at
runtime. Last, the `docs.ts` file is updated to no longer use `const`s for all
the doc link strings and instead use `let` which allows us to reload the links
at runtime after we have version data from the server.

Resolves cockroachdb#93273

Epic: None

Release note (ui change): Secure clusters now show correct login information in
the top right corner. Docs links correctly reference the current cluster
version when necessary.

Release note (bug fix): Secure clusters now show correct login information in
the top right corner. Docs links correctly reference the current cluster
version when necessary.
dhartunian added a commit to dhartunian/cockroach that referenced this issue Dec 21, 2022
Previous work that dynamically loaded the base ui data that we attach to
`Window` did not account for JS code which referenced the `dataFromServer`
variable directly in top-level consts. This led to a broken login widget in the
top right corner and docs links that would pin to "stable" versions instead of
the specific version link of the running cluster.

This commit does not completely fix the issue but it applies several
mitigations:

First, the redux store is now initialized with the loaded copy of the
`dataFromServer` info. This ensures that login information is initialized
properly. Second, the store is now constructed in the promise we define in
`index.tsx` instead of inline in the file in which it's defined, allowing us to
control execution ordering. Third, one of the `dataFromServer` usages in the
redux login selector is moved to be inside the selector to grab values at
runtime. Last, the `docs.ts` file is updated to no longer use `const`s for all
the doc link strings and instead use `let` which allows us to reload the links
at runtime after we have version data from the server.

Resolves cockroachdb#93273

Epic: None

Release note (ui change): Secure clusters now show correct login information in
the top right corner. Docs links correctly reference the current cluster
version when necessary.

Release note (bug fix): Secure clusters now show correct login information in
the top right corner. Docs links correctly reference the current cluster
version when necessary.
craig bot pushed a commit that referenced this issue Dec 21, 2022
94021: ui: dynamically read ui data on js load r=sjbarag a=dhartunian

Previous work that dynamically loaded the base ui data that we attach to `Window` did not account for JS code which referenced the `dataFromServer` variable directly in top-level consts. This led to a broken login widget in the top right corner and docs links that would pin to "stable" versions instead of the specific version link of the running cluster.

This commit does not completely fix the issue but it applies several mitigations:

First, the redux store is now initialized with the loaded copy of the `dataFromServer` info. This ensures that login information is initialized properly. Second, the store is now constructed in the promise we define in `index.tsx` instead of inline in the file in which it's defined, allowing us to control execution ordering. Third, one of the `dataFromServer` usages in the redux login selector is moved to be inside the selector to grab values at runtime. Last, the `docs.ts` file is updated to no longer use `const`s for all the doc link strings and instead use `let` which allows us to reload the links at runtime after we have version data from the server.

Resolves #93273

Epic: None

Release note (ui change): Secure clusters now show correct login information in the top right corner. Docs links correctly reference the current cluster version when necessary.

Release note (bug fix): Secure clusters now show correct login information in the top right corner. Docs links correctly reference the current cluster version when necessary.

Co-authored-by: David Hartunian <[email protected]>
dhartunian added a commit to dhartunian/cockroach that referenced this issue Dec 21, 2022
Previous work that dynamically loaded the base ui data that we attach to
`Window` did not account for JS code which referenced the `dataFromServer`
variable directly in top-level consts. This led to a broken login widget in the
top right corner and docs links that would pin to "stable" versions instead of
the specific version link of the running cluster.

This commit does not completely fix the issue but it applies several
mitigations:

First, the redux store is now initialized with the loaded copy of the
`dataFromServer` info. This ensures that login information is initialized
properly. Second, the store is now constructed in the promise we define in
`index.tsx` instead of inline in the file in which it's defined, allowing us to
control execution ordering. Third, one of the `dataFromServer` usages in the
redux login selector is moved to be inside the selector to grab values at
runtime. Last, the `docs.ts` file is updated to no longer use `const`s for all
the doc link strings and instead use `let` which allows us to reload the links
at runtime after we have version data from the server.

Resolves cockroachdb#93273

Epic: None

Release note (ui change): Secure clusters now show correct login information in
the top right corner. Docs links correctly reference the current cluster
version when necessary.

Release note (bug fix): Secure clusters now show correct login information in
the top right corner. Docs links correctly reference the current cluster
version when necessary.
@craig craig bot closed this as completed in a903401 Dec 21, 2022
blathers-crl bot pushed a commit that referenced this issue Dec 21, 2022
Previous work that dynamically loaded the base ui data that we attach to
`Window` did not account for JS code which referenced the `dataFromServer`
variable directly in top-level consts. This led to a broken login widget in the
top right corner and docs links that would pin to "stable" versions instead of
the specific version link of the running cluster.

This commit does not completely fix the issue but it applies several
mitigations:

First, the redux store is now initialized with the loaded copy of the
`dataFromServer` info. This ensures that login information is initialized
properly. Second, the store is now constructed in the promise we define in
`index.tsx` instead of inline in the file in which it's defined, allowing us to
control execution ordering. Third, one of the `dataFromServer` usages in the
redux login selector is moved to be inside the selector to grab values at
runtime. Last, the `docs.ts` file is updated to no longer use `const`s for all
the doc link strings and instead use `let` which allows us to reload the links
at runtime after we have version data from the server.

Resolves #93273

Epic: None

Release note (ui change): Secure clusters now show correct login information in
the top right corner. Docs links correctly reference the current cluster
version when necessary.

Release note (bug fix): Secure clusters now show correct login information in
the top right corner. Docs links correctly reference the current cluster
version when necessary.
adityamaru pushed a commit to adityamaru/cockroach that referenced this issue Dec 22, 2022
Previous work that dynamically loaded the base ui data that we attach to
`Window` did not account for JS code which referenced the `dataFromServer`
variable directly in top-level consts. This led to a broken login widget in the
top right corner and docs links that would pin to "stable" versions instead of
the specific version link of the running cluster.

This commit does not completely fix the issue but it applies several
mitigations:

First, the redux store is now initialized with the loaded copy of the
`dataFromServer` info. This ensures that login information is initialized
properly. Second, the store is now constructed in the promise we define in
`index.tsx` instead of inline in the file in which it's defined, allowing us to
control execution ordering. Third, one of the `dataFromServer` usages in the
redux login selector is moved to be inside the selector to grab values at
runtime. Last, the `docs.ts` file is updated to no longer use `const`s for all
the doc link strings and instead use `let` which allows us to reload the links
at runtime after we have version data from the server.

Resolves cockroachdb#93273

Epic: None

Release note (ui change): Secure clusters now show correct login information in
the top right corner. Docs links correctly reference the current cluster
version when necessary.

Release note (bug fix): Secure clusters now show correct login information in
the top right corner. Docs links correctly reference the current cluster
version when necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-observability-inf branch-release-22.2 Used to mark GA and release blockers, technical advisories, and bugs for 22.2 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants