Skip to content

Commit

Permalink
Merge branch 'main' into validate-authurl
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehinds authored Jul 4, 2024
2 parents f7491bb + ff2be84 commit 3610f83
Show file tree
Hide file tree
Showing 43 changed files with 1,557 additions and 1,176 deletions.
2 changes: 1 addition & 1 deletion .clusterfuzzlite/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ compile_native_go_fuzzer github.com/stacklok/minder/internal/engine/eval/rego Fu
compile_native_go_fuzzer github.com/stacklok/minder/internal/controlplane FuzzGitHubEventParsers FuzzGitHubEventParsers
compile_native_go_fuzzer github.com/stacklok/minder/internal/engine/ingester/diff FuzzDiffParse FuzzDiffParse
compile_native_go_fuzzer github.com/stacklok/minder/internal/crypto FuzzEncryptDecrypt FuzzEncryptDecrypt
compile_native_go_fuzzer github.com/stacklok/minder/internal/auth FuzzParseAndValidate FuzzParseAndValidate
compile_native_go_fuzzer github.com/stacklok/minder/internal/auth/jwt FuzzParseAndValidate FuzzParseAndValidate
2 changes: 1 addition & 1 deletion .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Test build on x86
id: docker_build
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0
with:
context: .
file: ./docker/minder/Dockerfile
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/app/project/role/role_grant_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func GrantListCommand(ctx context.Context, cmd *cobra.Command, _ []string, conn
case app.Table:
t := initializeTableForGrantListRoleAssignments()
for _, r := range resp.RoleAssignments {
t.AddRow(r.Subject, r.Role, *r.Project)
t.AddRow(fmt.Sprintf("%s / %s", r.DisplayName, r.Subject), r.Role, *r.Project)
}
t.Render()
if len(resp.Invitations) > 0 {
Expand All @@ -98,7 +98,7 @@ func GrantListCommand(ctx context.Context, cmd *cobra.Command, _ []string, conn
}

func initializeTableForGrantListRoleAssignments() table.Table {
return table.New(table.Simple, layouts.Default, []string{"Subject", "Role", "Project"})
return table.New(table.Simple, layouts.Default, []string{"User", "Role", "Project"})
}

func initializeTableForGrantListInvitations() table.Table {
Expand Down
3 changes: 2 additions & 1 deletion cmd/cli/app/project/role/role_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package role

import (
"context"
"fmt"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down Expand Up @@ -81,7 +82,7 @@ func UpdateCommand(ctx context.Context, cmd *cobra.Command, _ []string, conn *gr
// Otherwise, print the role assignments if it was about updating a role
t := initializeTableForGrantListRoleAssignments()
for _, r := range ret.RoleAssignments {
t.AddRow(r.Subject, r.Role, *r.Project)
t.AddRow(fmt.Sprintf("%s / %s", r.DisplayName, r.Subject), r.Role, *r.Project)
}
t.Render()
return nil
Expand Down
2 changes: 1 addition & 1 deletion cmd/dev/app/testserver/testserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/spf13/viper"

"github.com/stacklok/minder/internal/auth"
noopauth "github.com/stacklok/minder/internal/auth/noop"
noopauth "github.com/stacklok/minder/internal/auth/jwt/noop"
mockauthz "github.com/stacklok/minder/internal/authz/mock"
"github.com/stacklok/minder/internal/config"
serverconfig "github.com/stacklok/minder/internal/config/server"
Expand Down
3 changes: 2 additions & 1 deletion cmd/server/app/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/viper"

"github.com/stacklok/minder/internal/auth"
"github.com/stacklok/minder/internal/auth/jwt"
"github.com/stacklok/minder/internal/auth/keycloak"
"github.com/stacklok/minder/internal/authz"
"github.com/stacklok/minder/internal/config"
Expand Down Expand Up @@ -100,7 +101,7 @@ var serveCmd = &cobra.Command{
if err != nil {
return fmt.Errorf("failed to create issuer URL: %w\n", err)
}
jwt, err := auth.NewJwtValidator(ctx, jwksUrl.String(), issUrl.String(), cfg.Identity.Server.Audience)
jwt, err := jwt.NewJwtValidator(ctx, jwksUrl.String(), issUrl.String(), cfg.Identity.Server.Audience)
if err != nil {
return fmt.Errorf("failed to fetch and cache identity provider JWKS: %w\n", err)
}
Expand Down
Loading

0 comments on commit 3610f83

Please sign in to comment.