Repository: flyteorg/flyte
Pull request #6015 (2024-11-14 22:36:18)

Update CODEOWNERS - remove nikki
## Why are the changes needed?
Stop spamming @neverett 

<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->

## What changes were proposed in this pull request?

<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If there is design documentation, please add the link.
-->

## How was this patch tested?

<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->

### Setup process

### Screenshots

## Check all the applicable boxes <!-- Follow the above conventions to check the box -->

- [ ] I updated the documentation accordingly.
- [ ] All new and existing tests passed.
- [ ] All commits are signed-off.

## Related PRs

<!-- Add related pull requests for reviewers to check -->

## Docs link

<!-- Add documentation link built by CI jobs here, and specify the changed place -->



Patch:
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index b7a72457b..3a1f9869d 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -9,6 +9,7 @@ on:
   push:
     branches:
       - master
+      - 'release-v**'
 env:
   GO_VERSION: "1.22"
   PRIORITIES: "P0"
diff --git a/.github/workflows/flytectl-install.yml b/.github/workflows/flytectl-install.yml
index cbdb3795e..3d56a805e 100644
--- a/.github/workflows/flytectl-install.yml
+++ b/.github/workflows/flytectl-install.yml
@@ -8,6 +8,7 @@ on:
   pull_request:
     paths:
       - flytectl/**
+      - 'release-v**'
   push:
     branches:
       - master
diff --git a/.github/workflows/flyteidl-buf-publish.yml b/.github/workflows/flyteidl-buf-publish.yml
index f11bf3d44..aef8c94e2 100644
--- a/.github/workflows/flyteidl-buf-publish.yml
+++ b/.github/workflows/flyteidl-buf-publish.yml
@@ -6,6 +6,7 @@ on:
       - artifacts-shell-2
       - artifacts
       - master
+      - 'release-v**'
     paths:
       - 'flyteidl/**'
 jobs:
diff --git a/.github/workflows/flyteidl-checks.yml b/.github/workflows/flyteidl-checks.yml
index f8a1d0f4d..781b173e4 100644
--- a/.github/workflows/flyteidl-checks.yml
+++ b/.github/workflows/flyteidl-checks.yml
@@ -9,6 +9,7 @@ on:
   push:
     branches:
       - master
+      - 'release-v**'
 env:
   GO_VERSION: "1.22"
 jobs:
diff --git a/.github/workflows/helm-charts.yaml b/.github/workflows/helm-charts.yaml
index 63e81adf3..6c87eda61 100644
--- a/.github/workflows/helm-charts.yaml
+++ b/.github/workflows/helm-charts.yaml
@@ -10,6 +10,7 @@ on:
     branches:
       - master
       - rc/*
+      - 'release-v**'
   workflow_dispatch:
 
 jobs:
diff --git a/.github/workflows/single-binary.yml b/.github/workflows/single-binary.yml
index 4f3fdea99..92fb5e53e 100644
--- a/.github/workflows/single-binary.yml
+++ b/.github/workflows/single-binary.yml
@@ -10,6 +10,7 @@ on:
     branches:
       - master
       - rc/*
+      - 'release-v**'
   workflow_dispatch:
 
 jobs:
diff --git a/.github/workflows/validate-helm-charts.yaml b/.github/workflows/validate-helm-charts.yaml
index 8e40ffe8d..1bf450a85 100644
--- a/.github/workflows/validate-helm-charts.yaml
+++ b/.github/workflows/validate-helm-charts.yaml
@@ -4,6 +4,7 @@ on:
   pull_request:
     branches:
       - master
+      - 'release-v**'
     paths:
       - "charts/**"
       - "deployment/**"
diff --git a/CODEOWNERS b/CODEOWNERS
index da2c5bdd5..635c0d432 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -1,3 +1,3 @@
 # Automatically request docs team for docs PR review
-/docs/              @neverett @ppiegaze
+/docs/              @ppiegaze
 /docs/deployment/   @davidmirror-ops
diff --git a/docs/user_guide/advanced_composition/chaining_flyte_entities.md b/docs/user_guide/advanced_composition/chaining_flyte_entities.md
index 4fb12a414..3a6f85a72 100644
--- a/docs/user_guide/advanced_composition/chaining_flyte_entities.md
+++ b/docs/user_guide/advanced_composition/chaining_flyte_entities.md
@@ -17,7 +17,7 @@ To clone and run the example code on this page, see the [Flytesnacks repo][flyte
 
 Let's establish a sequence where `t1()` occurs after `t0()`, and `t2()` follows `t1()`.
  
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/chain_entities.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/chain_entities.py
 :caption: advanced_composition/chain_entities.py
 :lines: 1-30
 ```
@@ -27,7 +27,7 @@ Let's establish a sequence where `t1()` occurs after `t0()`, and `t2()` follows
 
 Just like tasks, you can chain {ref}`subworkflows <subworkflow>`.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/chain_entities.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/chain_entities.py
 :caption: advanced_composition/chain_entities.py
 :lines: 34-49
 ```
diff --git a/docs/user_guide/advanced_composition/conditionals.md b/docs/user_guide/advanced_composition/conditionals.md
index 27fb05357..84d21bb30 100644
--- a/docs/user_guide/advanced_composition/conditionals.md
+++ b/docs/user_guide/advanced_composition/conditionals.md
@@ -18,7 +18,7 @@ To clone and run the example code on this page, see the [Flytesnacks repo][flyte
 
 To begin, import the necessary libraries.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/656e63d1c8dded3e9e7161c7af6425e9fcd43f56/examples/advanced_composition/advanced_composition/conditional.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/conditional.py
 :caption: advanced_composition/conditional.py
 :lines: 1-4
 ```
@@ -29,7 +29,7 @@ In this example, we introduce two tasks, `calculate_circle_circumference` and
 `calculate_circle_area`. The workflow dynamically chooses between these tasks based on whether the input
 falls within the fraction range (0-1) or not.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/656e63d1c8dded3e9e7161c7af6425e9fcd43f56/examples/advanced_composition/advanced_composition/conditional.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/conditional.py
 :caption: advanced_composition/conditional.py
 :lines: 12-38
 ```
@@ -40,7 +40,7 @@ We establish an `if` condition with multiple branches, which will result in a fa
 It's important to note that any `conditional` statement in Flyte is expected to be complete,
 meaning that all possible branches must be accounted for.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/656e63d1c8dded3e9e7161c7af6425e9fcd43f56/examples/advanced_composition/advanced_composition/conditional.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/conditional.py
 :caption: advanced_composition/conditional.py
 :pyobject: shape_properties_with_multiple_branches
 ```
@@ -55,7 +55,7 @@ a convention also observed in other libraries.
 ## Consuming the output of a conditional
 Here, we write a task that consumes the output returned by a `conditional`.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/656e63d1c8dded3e9e7161c7af6425e9fcd43f56/examples/advanced_composition/advanced_composition/conditional.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/conditional.py
 :caption: advanced_composition/conditional.py
 :lines: 67-85
 ```
@@ -66,7 +66,7 @@ You can check if a boolean returned from the previous task is `True`,
 but unary operations are not supported directly. Instead, use the `is_true`,
 `is_false` and `is_none` methods on the result.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/656e63d1c8dded3e9e7161c7af6425e9fcd43f56/examples/advanced_composition/advanced_composition/conditional.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/conditional.py
 :caption: advanced_composition/conditional.py
 :lines: 93-123
 ```
@@ -79,7 +79,7 @@ Inputs and outputs are automatically encapsulated in a special object known as {
 ## Using boolean workflow inputs in a conditional
 You can directly pass a boolean to a workflow.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/656e63d1c8dded3e9e7161c7af6425e9fcd43f56/examples/advanced_composition/advanced_composition/conditional.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/conditional.py
 :caption: advanced_composition/conditional.py
 :pyobject: boolean_input_wf
 ```
@@ -92,7 +92,7 @@ This special object enables it to exhibit additional behavior.
 
 You can run the workflows locally as follows:
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/656e63d1c8dded3e9e7161c7af6425e9fcd43f56/examples/advanced_composition/advanced_composition/conditional.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/conditional.py
 :caption: advanced_composition/conditional.py
 :lines: 133-139
 ```
@@ -102,7 +102,7 @@ You can run the workflows locally as follows:
 You can nest conditional sections arbitrarily inside other conditional sections.
 However, these nested sections can only be in the `then` part of a `conditional` block.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/656e63d1c8dded3e9e7161c7af6425e9fcd43f56/examples/advanced_composition/advanced_composition/conditional.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/conditional.py
 :caption: advanced_composition/conditional.py
 :lines: 146-168
 ```
@@ -112,14 +112,14 @@ However, these nested sections can only be in the `then` part of a `conditional`
 Let's write a fun workflow that triggers the `calculate_circle_circumference` task in the event of a "heads" outcome,
 and alternatively, runs the `calculate_circle_area` task in the event of a "tail" outcome.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/656e63d1c8dded3e9e7161c7af6425e9fcd43f56/examples/advanced_composition/advanced_composition/conditional.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/conditional.py
 :caption: advanced_composition/conditional.py
 :pyobject: consume_task_output
 ```
 
 You can run the workflow locally as follows:
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/656e63d1c8dded3e9e7161c7af6425e9fcd43f56/examples/advanced_composition/advanced_composition/conditional.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/conditional.py
 :caption: advanced_composition/conditional.py
 :lines: 216-225
 ```
@@ -138,7 +138,7 @@ task-plugins:
 ```
 :::
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/656e63d1c8dded3e9e7161c7af6425e9fcd43f56/examples/advanced_composition/advanced_composition/conditional.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/conditional.py
 :caption: advanced_composition/conditional.py
 :lines: 200-212
 ```
diff --git a/docs/user_guide/advanced_composition/decorating_tasks.md b/docs/user_guide/advanced_composition/decorating_tasks.md
index 6b39c9f36..716570379 100644
--- a/docs/user_guide/advanced_composition/decorating_tasks.md
+++ b/docs/user_guide/advanced_composition/decorating_tasks.md
@@ -17,14 +17,14 @@ To clone and run the example code on this page, see the [Flytesnacks repo][flyte
 
 To begin, import the required dependencies.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/decorating_tasks.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/decorating_tasks.py
 :caption: advanced_composition/decorating_tasks.py
 :lines: 1-4
 ```
 
 Create a logger to monitor the execution's progress.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/decorating_tasks.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/decorating_tasks.py
 :caption: advanced_composition/decorating_tasks.py
 :lines: 7
 ```
@@ -33,7 +33,7 @@ Create a logger to monitor the execution's progress.
 
 We define a decorator that logs the input and output details for a decorated task.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/decorating_tasks.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/decorating_tasks.py
 :caption: advanced_composition/decorating_tasks.py
 :pyobject: log_io
 ```
@@ -44,7 +44,7 @@ We create a task named `t1` that is decorated with `log_io`.
 The order of invoking the decorators is important. `@task` should always be the outer-most decorator.
 :::
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/decorating_tasks.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/decorating_tasks.py
 :caption: advanced_composition/decorating_tasks.py
 :pyobject: t1
 ```
@@ -58,7 +58,7 @@ You can also stack multiple decorators on top of each other as long as `@task` i
 We define a decorator that verifies if the output from the decorated function is a positive number before it's returned.
 If this assumption is violated, it raises a `ValueError` exception.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/decorating_tasks.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/decorating_tasks.py
 :caption: advanced_composition/decorating_tasks.py
 :pyobject: validate_output
 ```
@@ -69,14 +69,14 @@ The output of the `validate_output` task uses {py:func}`~functools.partial` to i
 
 We define a function that uses both the logging and validator decorators.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/decorating_tasks.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/decorating_tasks.py
 :caption: advanced_composition/decorating_tasks.py
 :pyobject: t2
 ```
 
 Finally, we compose a workflow that calls `t1` and `t2`.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/decorating_tasks.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/decorating_tasks.py
 :caption: advanced_composition/decorating_tasks.py
 :lines: 53-59
 ```
diff --git a/docs/user_guide/advanced_composition/dynamic_workflows.md b/docs/user_guide/advanced_composition/dynamic_workflows.md
index 949d88a84..534e05954 100644
--- a/docs/user_guide/advanced_composition/dynamic_workflows.md
+++ b/docs/user_guide/advanced_composition/dynamic_workflows.md
@@ -40,28 +40,28 @@ To clone and run the example code on this page, see the [Flytesnacks repo][flyte
 
 To begin, we import the required libraries.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/dynamic_workflow.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/dynamic_workflow.py
 :caption: advanced_composition/dynamic_workflow.py
 :lines: 1
 ```
 
 We define a task that returns the index of a character, where A-Z/a-z is equivalent to 0-25.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/dynamic_workflow.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/dynamic_workflow.py
 :caption: advanced_composition/dynamic_workflow.py
 :pyobject: return_index
 ```
 
 We also create a task that prepares a list of 26 characters by populating the frequency of each character.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/dynamic_workflow.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/dynamic_workflow.py
 :caption: advanced_composition/dynamic_workflow.py
 :pyobject: update_list
 ```
 
 We define a task to calculate the number of common characters between the two strings.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/dynamic_workflow.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/dynamic_workflow.py
 :caption: advanced_composition/dynamic_workflow.py
 :pyobject: derive_count
 ```
@@ -75,7 +75,7 @@ We define a dynamic workflow to accomplish the following:
 
 The looping process is contingent on the number of characters in both strings, which is unknown until runtime.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/dynamic_workflow.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/dynamic_workflow.py
 :caption: advanced_composition/dynamic_workflow.py
 :pyobject: count_characters
 ```
@@ -97,14 +97,14 @@ Local execution works when a `@dynamic` decorator is used because Flytekit treat
 
 Define a workflow that triggers the dynamic workflow.
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/dynamic_workflow.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/dynamic_workflow.py
 :caption: advanced_composition/dynamic_workflow.py
 :pyobject: dynamic_wf
 ```
 
 You can run the workflow locally as follows:
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/advanced_composition/advanced_composition/dynamic_workflow.py
+```{literalinclude} /examples/advanced_composition/advanced_composition/dynamic_workflow.py
 :caption: advanced_composition/dynamic_workflow.py
 :lines: 78-79
 ```
diff --git a/docs/user_guide/getting_started_with_workflow_development/flyte_project_components.md b/docs/user_guide/getting_started_with_workflow_development/flyte_project_components.md
index 47821c520..4b6ce43d6 100644
--- a/docs/user_guide/getting_started_with_workflow_development/flyte_project_components.md
+++ b/docs/user_guide/getting_started_with_workflow_development/flyte_project_components.md
@@ -33,8 +33,8 @@ manage your project's Python requirements.
 
 ````{dropdown} See requirements.txt
 
-```{rli} https://raw.githubusercontent.com/flyteorg/flytekit-python-template/main/basic-template-imagespec/%7B%7Bcookiecutter.project_name%7D%7D/requirements.txt
-:caption: requirements.txt
+```{code-block} bash
+flytekit>=1.5.0
 ```
 
 ````
diff --git a/flyteadmin/auth/cookie.go b/flyteadmin/auth/cookie.go
index 2470220d2..456eeb858 100644
--- a/flyteadmin/auth/cookie.go
+++ b/flyteadmin/auth/cookie.go
@@ -12,6 +12,7 @@ import (
 	"github.com/gorilla/securecookie"
 
 	"github.com/flyteorg/flyte/flyteadmin/auth/interfaces"
+	"github.com/flyteorg/flyte/flyteadmin/pkg/config"
 	"github.com/flyteorg/flyte/flytestdlib/errors"
 	"github.com/flyteorg/flyte/flytestdlib/logger"
 )
@@ -68,6 +69,8 @@ func NewSecureCookie(cookieName, value string, hashKey, blockKey []byte, domain
 		Value:    encoded,
 		Domain:   domain,
 		SameSite: sameSiteMode,
+		HttpOnly: true,
+		Secure:   !config.GetConfig().Security.InsecureCookieHeader,
 	}, nil
 }
 
@@ -126,6 +129,7 @@ func NewCsrfCookie() http.Cookie {
 		Value:    csrfStateToken,
 		SameSite: http.SameSiteLaxMode,
 		HttpOnly: true,
+		Secure:   !config.GetConfig().Security.InsecureCookieHeader,
 	}
 }
 
@@ -164,6 +168,7 @@ func NewRedirectCookie(ctx context.Context, redirectURL string) *http.Cookie {
 		Value:    urlObj.String(),
 		SameSite: http.SameSiteLaxMode,
 		HttpOnly: true,
+		Secure:   !config.GetConfig().Security.InsecureCookieHeader,
 	}
 }
 
diff --git a/flyteadmin/auth/cookie_manager.go b/flyteadmin/auth/cookie_manager.go
index ce360c9d3..8a23272d0 100644
--- a/flyteadmin/auth/cookie_manager.go
+++ b/flyteadmin/auth/cookie_manager.go
@@ -11,6 +11,7 @@ import (
 	"golang.org/x/oauth2"
 
 	"github.com/flyteorg/flyte/flyteadmin/auth/config"
+	serverConfig "github.com/flyteorg/flyte/flyteadmin/pkg/config"
 	"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service"
 	"github.com/flyteorg/flyte/flytestdlib/errors"
 	"github.com/flyteorg/flyte/flytestdlib/logger"
@@ -218,6 +219,7 @@ func (c *CookieManager) getLogoutCookie(name string) *http.Cookie {
 		Domain:   c.domain,
 		MaxAge:   0,
 		HttpOnly: true,
+		Secure:   !serverConfig.GetConfig().Security.InsecureCookieHeader,
 		Expires:  time.Now().Add(-1 * time.Hour),
 	}
 }
diff --git a/flyteadmin/pkg/config/config.go b/flyteadmin/pkg/config/config.go
index f6bdd2714..0e63eccb4 100644
--- a/flyteadmin/pkg/config/config.go
+++ b/flyteadmin/pkg/config/config.go
@@ -66,10 +66,13 @@ type KubeClientConfig struct {
 }
 
 type ServerSecurityOptions struct {
-	Secure      bool       `json:"secure"`
-	Ssl         SslOptions `json:"ssl"`
-	UseAuth     bool       `json:"useAuth"`
-	AuditAccess bool       `json:"auditAccess"`
+	Secure  bool       `json:"secure"`
+	Ssl     SslOptions `json:"ssl"`
+	UseAuth bool       `json:"useAuth"`
+	// InsecureCookieHeader should only be set in the case where we want to serve cookies with the header "Secure" set to false.
+	// This is useful for local development and *never* in production.
+	InsecureCookieHeader bool `json:"insecureCookieHeader"`
+	AuditAccess          bool `json:"auditAccess"`
 
 	// These options are here to allow deployments where the Flyte UI (Console) is served from a different domain/port.
 	// Note that CORS only applies to Admin's API endpoints. The health check endpoint for instance is unaffected.
diff --git a/flyteadmin/pkg/config/serverconfig_flags.go b/flyteadmin/pkg/config/serverconfig_flags.go
index 10229a458..09a5d70a2 100755
--- a/flyteadmin/pkg/config/serverconfig_flags.go
+++ b/flyteadmin/pkg/config/serverconfig_flags.go
@@ -59,6 +59,7 @@ func (cfg ServerConfig) GetPFlagSet(prefix string) *pflag.FlagSet {
 	cmdFlags.String(fmt.Sprintf("%v%v", prefix, "security.ssl.certificateFile"), defaultServerConfig.Security.Ssl.CertificateFile, "")
 	cmdFlags.String(fmt.Sprintf("%v%v", prefix, "security.ssl.keyFile"), defaultServerConfig.Security.Ssl.KeyFile, "")
 	cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "security.useAuth"), defaultServerConfig.Security.UseAuth, "")
+	cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "security.insecureCookieHeader"), defaultServerConfig.Security.InsecureCookieHeader, "")
 	cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "security.auditAccess"), defaultServerConfig.Security.AuditAccess, "")
 	cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "security.allowCors"), defaultServerConfig.Security.AllowCors, "")
 	cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "security.allowedOrigins"), defaultServerConfig.Security.AllowedOrigins, "")


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 0571e60ee..8915d88fb 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -8,6 +8,7 @@ on:
   push:
     branches:
       - master
+      - 'release-v**'
   pull_request:
 jobs:
   compile:
diff --git a/flyteadmin/auth/cookie_manager_test.go b/flyteadmin/auth/cookie_manager_test.go
index 09d8468e8..444056ba8 100644
--- a/flyteadmin/auth/cookie_manager_test.go
+++ b/flyteadmin/auth/cookie_manager_test.go
@@ -16,6 +16,7 @@ import (
 	"golang.org/x/oauth2"
 
 	"github.com/flyteorg/flyte/flyteadmin/auth/config"
+	serverConfig "github.com/flyteorg/flyte/flyteadmin/pkg/config"
 	"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service"
 )
 
@@ -199,34 +200,53 @@ func TestCookieManager(t *testing.T) {
 		assert.EqualError(t, err, "[EMPTY_OAUTH_TOKEN] Error reading existing secure cookie [flyte_idt]. Error: [SECURE_COOKIE_ERROR] Error reading secure cookie flyte_idt, caused by: securecookie: error - caused by: crypto/aes: invalid key size 75")
 	})
 
-	t.Run("delete_cookies", func(t *testing.T) {
-		w := httptest.NewRecorder()
-
-		manager.DeleteCookies(ctx, w)
-
-		cookies := w.Result().Cookies()
-		require.Equal(t, 5, len(cookies))
-
-		assert.True(t, time.Now().After(cookies[0].Expires))
-		assert.Equal(t, cookieSetting.Domain, cookies[0].Domain)
-		assert.Equal(t, accessTokenCookieName, cookies[0].Name)
-
-		assert.True(t, time.Now().After(cookies[1].Expires))
-		assert.Equal(t, cookieSetting.Domain, cookies[1].Domain)
-		assert.Equal(t, accessTokenCookieNameSplitFirst, cookies[1].Name)
-
-		assert.True(t, time.Now().After(cookies[2].Expires))
-		assert.Equal(t, cookieSetting.Domain, cookies[2].Domain)
-		assert.Equal(t, accessTokenCookieNameSplitSecond, cookies[2].Name)
-
-		assert.True(t, time.Now().After(cookies[3].Expires))
-		assert.Equal(t, cookieSetting.Domain, cookies[3].Domain)
-		assert.Equal(t, refreshTokenCookieName, cookies[3].Name)
+	tests := []struct {
+		name                 string
+		insecureCookieHeader bool
+		expectedSecure       bool
+	}{
+		{
+			name:                 "secure_cookies",
+			insecureCookieHeader: false,
+			expectedSecure:       true,
+		},
+		{
+			name:                 "insecure_cookies",
+			insecureCookieHeader: true,
+			expectedSecure:       false,
+		},
+	}
 
-		assert.True(t, time.Now().After(cookies[4].Expires))
-		assert.Equal(t, cookieSetting.Domain, cookies[4].Domain)
-		assert.Equal(t, idTokenCookieName, cookies[4].Name)
-	})
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			w := httptest.NewRecorder()
+
+			serverConfig.SetConfig(&serverConfig.ServerConfig{
+				Security: serverConfig.ServerSecurityOptions{
+					InsecureCookieHeader: tt.insecureCookieHeader,
+				},
+			})
+
+			manager.DeleteCookies(ctx, w)
+
+			cookies := w.Result().Cookies()
+			require.Equal(t, 5, len(cookies))
+
+			// Check secure flag for each cookie
+			for _, cookie := range cookies {
+				assert.Equal(t, tt.expectedSecure, cookie.Secure)
+				assert.True(t, time.Now().After(cookie.Expires))
+				assert.Equal(t, cookieSetting.Domain, cookie.Domain)
+			}
+
+			// Check cookie names
+			assert.Equal(t, accessTokenCookieName, cookies[0].Name)
+			assert.Equal(t, accessTokenCookieNameSplitFirst, cookies[1].Name)
+			assert.Equal(t, accessTokenCookieNameSplitSecond, cookies[2].Name)
+			assert.Equal(t, refreshTokenCookieName, cookies[3].Name)
+			assert.Equal(t, idTokenCookieName, cookies[4].Name)
+		})
+	}
 
 	t.Run("get_http_same_site_policy", func(t *testing.T) {
 		manager.sameSitePolicy = config.SameSiteLaxMode
diff --git a/flyteadmin/auth/cookie_test.go b/flyteadmin/auth/cookie_test.go
index a5c58ad2f..1134e957d 100644
--- a/flyteadmin/auth/cookie_test.go
+++ b/flyteadmin/auth/cookie_test.go
@@ -4,7 +4,6 @@ import (
 	"bytes"
 	"context"
 	"encoding/base64"
-	"fmt"
 	"net/http"
 	"net/url"
 	"testing"
@@ -14,6 +13,7 @@ import (
 
 	"github.com/flyteorg/flyte/flyteadmin/auth/config"
 	"github.com/flyteorg/flyte/flyteadmin/auth/interfaces/mocks"
+	serverConfig "github.com/flyteorg/flyte/flyteadmin/pkg/config"
 	stdConfig "github.com/flyteorg/flyte/flytestdlib/config"
 )
 
@@ -26,22 +26,53 @@ func mustParseURL(t testing.TB, u string) url.URL {
 	return *res
 }
 
-// This function can also be called locally to generate new keys
 func TestSecureCookieLifecycle(t *testing.T) {
-	hashKey := securecookie.GenerateRandomKey(64)
-	assert.True(t, base64.RawStdEncoding.EncodeToString(hashKey) != "")
-
-	blockKey := securecookie.GenerateRandomKey(32)
-	assert.True(t, base64.RawStdEncoding.EncodeToString(blockKey) != "")
-	fmt.Printf("Hash key: |%s| Block key: |%s|\n",
-		base64.RawStdEncoding.EncodeToString(hashKey), base64.RawStdEncoding.EncodeToString(blockKey))
-
-	cookie, err := NewSecureCookie("choc", "chip", hashKey, blockKey, "localhost", http.SameSiteLaxMode)
-	assert.NoError(t, err)
+	tests := []struct {
+		name                 string
+		insecureCookieHeader bool
+		expectedSecure       bool
+	}{
+		{
+			name:                 "secure_cookie",
+			insecureCookieHeader: false,
+			expectedSecure:       true,
+		},
+		{
+			name:                 "insecure_cookie",
+			insecureCookieHeader: true,
+			expectedSecure:       false,
+		},
+	}
 
-	value, err := ReadSecureCookie(context.Background(), cookie, hashKey, blockKey)
-	assert.NoError(t, err)
-	assert.Equal(t, "chip", value)
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			// Generate hash and block keys for secure cookie
+			hashKey := securecookie.GenerateRandomKey(64)
+			assert.True(t, base64.RawStdEncoding.EncodeToString(hashKey) != "")
+
+			blockKey := securecookie.GenerateRandomKey(32)
+			assert.True(t, base64.RawStdEncoding.EncodeToString(blockKey) != "")
+
+			// Set up server configuration with insecureCookieHeader option
+			serverConfig.SetConfig(&serverConfig.ServerConfig{
+				Security: serverConfig.ServerSecurityOptions{
+					InsecureCookieHeader: tt.insecureCookieHeader,
+				},
+			})
+
+			// Create a secure cookie
+			cookie, err := NewSecureCookie("choc", "chip", hashKey, blockKey, "localhost", http.SameSiteLaxMode)
+			assert.NoError(t, err)
+
+			// Validate the Secure attribute of the cookie
+			assert.Equal(t, tt.expectedSecure, cookie.Secure)
+
+			// Read and validate the secure cookie value
+			value, err := ReadSecureCookie(context.Background(), cookie, hashKey, blockKey)
+			assert.NoError(t, err)
+			assert.Equal(t, "chip", value)
+		})
+	}
 }
 
 func TestNewCsrfToken(t *testing.T) {
@@ -50,9 +81,41 @@ func TestNewCsrfToken(t *testing.T) {
 }
 
 func TestNewCsrfCookie(t *testing.T) {
-	cookie := NewCsrfCookie()
-	assert.Equal(t, "flyte_csrf_state", cookie.Name)
-	assert.True(t, cookie.HttpOnly)
+	tests := []struct {
+		name                 string
+		insecureCookieHeader bool
+		expectedSecure       bool
+	}{
+		{
+			name:                 "secure_csrf_cookie",
+			insecureCookieHeader: false,
+			expectedSecure:       true,
+		},
+		{
+			name:                 "insecure_csrf_cookie",
+			insecureCookieHeader: true,
+			expectedSecure:       false,
+		},
+	}
+
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			// Set up server configuration with insecureCookieHeader option
+			serverConfig.SetConfig(&serverConfig.ServerConfig{
+				Security: serverConfig.ServerSecurityOptions{
+					InsecureCookieHeader: tt.insecureCookieHeader,
+				},
+			})
+
+			// Generate CSRF cookie
+			cookie := NewCsrfCookie()
+
+			// Validate CSRF cookie properties
+			assert.Equal(t, "flyte_csrf_state", cookie.Name)
+			assert.True(t, cookie.HttpOnly)
+			assert.Equal(t, tt.expectedSecure, cookie.Secure)
+		})
+	}
 }
 
 func TestHashCsrfState(t *testing.T) {
@@ -121,6 +184,36 @@ func TestNewRedirectCookie(t *testing.T) {
 		assert.NotNil(t, cookie)
 		assert.Equal(t, http.SameSiteLaxMode, cookie.SameSite)
 	})
+
+	tests := []struct {
+		name                 string
+		insecureCookieHeader bool
+		expectedSecure       bool
+	}{
+		{
+			name:                 "secure_cookies",
+			insecureCookieHeader: false,
+			expectedSecure:       true,
+		},
+		{
+			name:                 "insecure_cookies",
+			insecureCookieHeader: true,
+			expectedSecure:       false,
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			serverConfig.SetConfig(&serverConfig.ServerConfig{
+				Security: serverConfig.ServerSecurityOptions{
+					InsecureCookieHeader: tt.insecureCookieHeader,
+				},
+			})
+			ctx := context.Background()
+			cookie := NewRedirectCookie(ctx, "http://www.example.com/postLogin")
+			assert.NotNil(t, cookie)
+			assert.Equal(t, cookie.Secure, tt.expectedSecure)
+		})
+	}
 }
 
 func TestGetAuthFlowEndRedirect(t *testing.T) {
diff --git a/flyteadmin/pkg/config/serverconfig_flags_test.go b/flyteadmin/pkg/config/serverconfig_flags_test.go
index 6a95336f4..a18b56156 100755
--- a/flyteadmin/pkg/config/serverconfig_flags_test.go
+++ b/flyteadmin/pkg/config/serverconfig_flags_test.go
@@ -225,6 +225,20 @@ func TestServerConfig_SetFlags(t *testing.T) {
 			}
 		})
 	})
+	t.Run("Test_security.insecureCookieHeader", func(t *testing.T) {
+
+		t.Run("Override", func(t *testing.T) {
+			testValue := "1"
+
+			cmdFlags.Set("security.insecureCookieHeader", testValue)
+			if vBool, err := cmdFlags.GetBool("security.insecureCookieHeader"); err == nil {
+				testDecodeJson_ServerConfig(t, fmt.Sprintf("%v", vBool), &actual.Security.InsecureCookieHeader)
+
+			} else {
+				assert.FailNow(t, err.Error())
+			}
+		})
+	})
 	t.Run("Test_security.auditAccess", func(t *testing.T) {
 
 		t.Run("Override", func(t *testing.T) {