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

Set Secure Attribute on Session Cookie #6912

Closed
stanenbaum-va opened this issue Dec 4, 2023 · 4 comments · Fixed by #6930
Closed

Set Secure Attribute on Session Cookie #6912

stanenbaum-va opened this issue Dec 4, 2023 · 4 comments · Fixed by #6930
Assignees
Labels
backlog Triaged Issue added to backlog enhancement This is the preferred way to describe new end-to-end features.

Comments

@stanenbaum-va
Copy link

WASA scans reveal a low security finding when Kiali is served over HTTPS due to the kiali-token-aes only having HTTPOnly, without the Secure attribute.

@stanenbaum-va stanenbaum-va added the enhancement This is the preferred way to describe new end-to-end features. label Dec 4, 2023
@jshaughn
Copy link
Collaborator

jshaughn commented Dec 4, 2023

See #6907 for more on what is being requested here.

@jmazzitelli
Copy link
Collaborator

jmazzitelli commented Dec 6, 2023

And here is a brief overview of why this is being asked. https://resources.infosecinstitute.com/topics/general-security/securing-cookies-httponly-secure-flags

Note: Because Kiali's endpoint can be configured to use http only (as opposed to https) we'll want to be able to have the cookie sent over http. Thus the Secure flag should be set on the cookie only if Kiali's endpoint is specifically configured for https; it should not be set when Kiali's endpoint is configured for http.

@jmazzitelli jmazzitelli self-assigned this Dec 6, 2023
@jmazzitelli jmazzitelli added the backlog Triaged Issue added to backlog label Dec 6, 2023
jmazzitelli added a commit to jmazzitelli/kiali that referenced this issue Dec 6, 2023
jmazzitelli added a commit to jmazzitelli/kiali that referenced this issue Dec 6, 2023
@jmazzitelli
Copy link
Collaborator

This has been implemented - #6930 - that PR is just waiting on review; if that happens in the next day or two, this might get into the upcoming release.

jmazzitelli added a commit to jmazzitelli/kiali that referenced this issue Dec 7, 2023
jmazzitelli added a commit that referenced this issue Dec 8, 2023
* set the Secure flag on auth cookies when appropriate
fixes: #6912

* rename IsServerHttps to IsServerHTTPS

* if server itself isn't using https, check to see if the proxy in front does

* fix some tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Triaged Issue added to backlog enhancement This is the preferred way to describe new end-to-end features.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants