Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/golangci/golangci-…
Browse files Browse the repository at this point in the history
…lint-action-6.0.1
  • Loading branch information
markphelps authored May 14, 2024
2 parents b403f0d + 9366e85 commit b9b05c7
Show file tree
Hide file tree
Showing 16 changed files with 110 additions and 92 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ includes:
path: .goreleaser.yml

changelog:
skip: true
disable: true

docker_manifests:
- name_template: "flipt/flipt:nightly"
Expand Down
6 changes: 3 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ nightly:
name_template: "{{ incpatch .Version }}-nightly"

changelog:
skip: true
disable: true

dockers:
- dockerfile: ./build/Dockerfile
Expand Down Expand Up @@ -138,9 +138,9 @@ announce:
brews:
- name: flipt
homepage: https://flipt.io
description: An open source, self-hosted feature flag solution
description: Enterprise-ready, GitOps enabled, CloudNative feature management solution
license: GPL-3.0-only
folder: Formula
directory: Formula
skip_upload: auto
install: |
bin.install "flipt"
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.41.2](https://github.com/flipt-io/flipt/releases/tag/v1.41.2) - 2024-05-14

### Fixed

- Bug in rules evaluation with no distributions for declarative stores (#3076)
- Make OCI reauthenticate when using AWS ECR (#3044)

## [v1.41.1](https://github.com/flipt-io/flipt/releases/tag/v1.41.1) - 2024-05-01

### Fixed
Expand Down
12 changes: 6 additions & 6 deletions _tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/golangci/golangci-lint v1.51.2
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1
github.com/rakyll/gotest v0.0.6
golang.org/x/tools v0.20.0
golang.org/x/tools v0.21.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
google.golang.org/protobuf v1.34.1
)
Expand Down Expand Up @@ -221,15 +221,15 @@ require (
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect
golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa // indirect
google.golang.org/grpc v1.62.1 // indirect
Expand Down
24 changes: 12 additions & 12 deletions _tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
Expand Down Expand Up @@ -787,8 +787,8 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -868,16 +868,16 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q=
golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -888,8 +888,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -966,8 +966,8 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k=
golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k=
golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=
golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg=
golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw=
golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
2 changes: 1 addition & 1 deletion cmd/flipt/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (c *cloudCommand) login(cmd *cobra.Command, args []string) error {
return fmt.Errorf("waiting for token: %w", err)
}

if err := flow.Close(); err != nil {
if err := flow.Close(); err != nil && !errors.Is(err, net.ErrClosed) {
return fmt.Errorf("closing flow: %w", err)
}

Expand Down
2 changes: 2 additions & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+Licev
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
github.com/google/cel-go v0.17.1/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY=
Expand Down Expand Up @@ -1268,6 +1269,7 @@ golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
Expand Down
4 changes: 4 additions & 0 deletions internal/server/authn/middleware/grpc/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ func JWTAuthenticationInterceptor(logger *zap.Logger, validator jwt.Validator, e
}
}

if iss, ok := jwtClaims["iss"].(string); ok {
metadata["io.flipt.auth.jwt.issuer"] = iss
}

auth := &authrpc.Authentication{
Method: authrpc.Method_METHOD_JWT,
Metadata: metadata,
Expand Down
21 changes: 11 additions & 10 deletions internal/server/authn/middleware/grpc/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestJWTAuthenticationInterceptor(t *testing.T) {
name: "successful authentication",
metadataFunc: func() metadata.MD {
claims := map[string]interface{}{
"iss": "https://flipt.io/",
"iss": "flipt.io",
"aud": "flipt",
"sub": "sunglasses",
"iat": nowUnix,
Expand All @@ -84,7 +84,7 @@ func TestJWTAuthenticationInterceptor(t *testing.T) {
}
},
expectedJWT: jwt.Expected{
Issuer: "https://flipt.io/",
Issuer: "flipt.io",
Audiences: []string{"flipt"},
Subject: "sunglasses",
},
Expand All @@ -93,7 +93,7 @@ func TestJWTAuthenticationInterceptor(t *testing.T) {
name: "successful authentication (with custom user claims)",
metadataFunc: func() metadata.MD {
claims := map[string]interface{}{
"iss": "https://flipt.io/",
"iss": "flipt.io",
"aud": "flipt",
"iat": nowUnix,
"exp": futureUnix,
Expand All @@ -111,21 +111,22 @@ func TestJWTAuthenticationInterceptor(t *testing.T) {
}
},
expectedJWT: jwt.Expected{
Issuer: "https://flipt.io/",
Issuer: "flipt.io",
Audiences: []string{"flipt"},
},
expectedMetadata: map[string]string{
"io.flipt.auth.jwt.sub": "sub",
"io.flipt.auth.jwt.email": "email",
"io.flipt.auth.jwt.picture": "image",
"io.flipt.auth.jwt.name": "name",
"io.flipt.auth.jwt.issuer": "flipt.io",
},
},
{
name: "invalid issuer",
metadataFunc: func() metadata.MD {
claims := map[string]interface{}{
"iss": "https://foo.com/",
"iss": "foo.com",
"iat": nowUnix,
"exp": futureUnix,
}
Expand All @@ -136,15 +137,15 @@ func TestJWTAuthenticationInterceptor(t *testing.T) {
}
},
expectedJWT: jwt.Expected{
Issuer: "https://flipt.io/",
Issuer: "flipt.io",
},
expectedErr: ErrUnauthenticated,
},
{
name: "invalid subject",
metadataFunc: func() metadata.MD {
claims := map[string]interface{}{
"iss": "https://flipt.io/",
"iss": "flipt.io",
"iat": nowUnix,
"exp": futureUnix,
"sub": "bar",
Expand All @@ -156,7 +157,7 @@ func TestJWTAuthenticationInterceptor(t *testing.T) {
}
},
expectedJWT: jwt.Expected{
Issuer: "https://flipt.io/",
Issuer: "flipt.io",
Subject: "flipt",
},
expectedErr: ErrUnauthenticated,
Expand All @@ -165,7 +166,7 @@ func TestJWTAuthenticationInterceptor(t *testing.T) {
name: "invalid audience",
metadataFunc: func() metadata.MD {
claims := map[string]interface{}{
"iss": "https://flipt.io/",
"iss": "flipt.io",
"iat": nowUnix,
"exp": futureUnix,
"aud": "bar",
Expand All @@ -177,7 +178,7 @@ func TestJWTAuthenticationInterceptor(t *testing.T) {
}
},
expectedJWT: jwt.Expected{
Issuer: "https://flipt.io/",
Issuer: "flipt.io",
Audiences: []string{"flipt"},
},
expectedErr: ErrUnauthenticated,
Expand Down
34 changes: 17 additions & 17 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@heroicons/react": "^2.1.3",
"@loadable/component": "^5.16.3",
"@reduxjs/toolkit": "^2.2.3",
"@tanstack/react-table": "^8.13.2",
"@tanstack/react-table": "^8.17.3",
"@uiw/codemirror-theme-tokyo-night": "^4.22.0",
"@uiw/react-codemirror": "^4.21.25",
"buffer": "^6.0.3",
Expand Down
4 changes: 1 addition & 3 deletions ui/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ export default function Header(props: HeaderProps) {
{info && info.updateAvailable && <Notifications info={info} />}

{/* user profile */}
{session && session.self && (
<UserProfile metadata={session.self.metadata} />
)}
{session && session.self && <UserProfile session={session.self} />}
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit b9b05c7

Please sign in to comment.