Skip to content

Commit

Permalink
Fix Oauth2 Provider SIGSEGV (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
spjmurray authored Jun 28, 2024
1 parent f94b6dd commit f9fe5ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions charts/identity/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: A Helm chart for deploying Unikorn's IdP

type: application

version: v0.2.17
appVersion: v0.2.17
version: v0.2.18
appVersion: v0.2.18

icon: https://raw.githubusercontent.com/unikorn-cloud/assets/main/images/logos/dark-on-light/icon.png

Expand Down
8 changes: 5 additions & 3 deletions pkg/handler/oauth2providers/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,18 @@ func (c *Client) get(ctx context.Context, organization *organizations.Meta, prov
}

func convert(permissions *rbac.Permissions, in *unikornv1.OAuth2Provider) *openapi.Oauth2ProviderRead {
t := openapi.Oauth2ProviderType(*in.Spec.Type)

out := &openapi.Oauth2ProviderRead{
Metadata: conversion.OrganizationScopedResourceReadMetadata(in, coreopenapi.ResourceProvisioningStatusProvisioned),
Spec: openapi.Oauth2ProviderSpec{
Type: &t,
ClientID: in.Spec.ClientID,
},
}

if in.Spec.Type != nil {
t := openapi.Oauth2ProviderType(*in.Spec.Type)
out.Spec.Type = &t
}

// Only show sensitive details for organizations you are an admin of.
if showDetails(permissions) {
out.Spec.ClientSecret = in.Spec.ClientSecret
Expand Down

0 comments on commit f9fe5ae

Please sign in to comment.