Skip to content

fix: make secure cookie settings conditional on dev mode#2939

Merged
migmartri merged 1 commit intochainloop-dev:mainfrom
migmartri:fix/dev-mode-secure-cookies
Mar 26, 2026
Merged

fix: make secure cookie settings conditional on dev mode#2939
migmartri merged 1 commit intochainloop-dev:mainfrom
migmartri:fix/dev-mode-secure-cookies

Conversation

@migmartri
Copy link
Copy Markdown
Member

Summary

  • Make HttpOnly, Secure, and SameSite cookie attributes conditional on non-development mode (server.Version != "dev")
  • In dev mode, secure cookie settings are relaxed so OAuth flows work without HTTPS on non-localhost addresses

Closes #2937

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/controlplane/internal/service/auth.go">

<violation number="1" location="app/controlplane/internal/service/auth.go:450">
P2: Keep `HttpOnly` enabled even in dev mode; only `Secure`/`SameSite` need to be relaxed for non-HTTPS local OAuth flows.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Closes chainloop-dev#2937

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Update app/controlplane/internal/service/auth.go

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Signed-off-by: Miguel Martinez Trivino <migmartri@gmail.com>

update

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@migmartri migmartri force-pushed the fix/dev-mode-secure-cookies branch from d4763c1 to 309cf21 Compare March 26, 2026 21:18
@migmartri migmartri merged commit b8cc511 into chainloop-dev:main Mar 26, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make secure cookie settings conditional on non-development mode

2 participants