Skip to content

Commit

Permalink
Removed old, changes. Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamFlanagan-Nscale committed Dec 3, 2024
1 parent 9d0273b commit 8f1537e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ By default, users must be part of an organization to authenticate. This is the m

However, for some deployments you may want to allow users to self-register. To enable this, follow these steps:

1. Enable new user organizations in values.yaml:
1. Enable unknown user authentication in values.yaml:

```yaml
identity:
Expand Down
8 changes: 4 additions & 4 deletions pkg/handler/organizations/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func convertOrganizationType(in *unikornv1.Organization) openapi.OrganizationTyp
return openapi.Adhoc
}

func Convert(in *unikornv1.Organization) *openapi.OrganizationRead {
func convert(in *unikornv1.Organization) *openapi.OrganizationRead {
provisioningStatus := coreopenapi.ResourceProvisioningStatusUnknown

if condition, err := in.StatusConditionRead(unikornv1core.ConditionAvailable); err == nil {
Expand Down Expand Up @@ -123,7 +123,7 @@ func convertList(in *unikornv1.OrganizationList) openapi.Organizations {
out := make(openapi.Organizations, len(in.Items))

for i := range in.Items {
out[i] = *Convert(&in.Items[i])
out[i] = *convert(&in.Items[i])
}

return out
Expand Down Expand Up @@ -186,7 +186,7 @@ func (c *Client) Get(ctx context.Context, organizationID string) (*openapi.Organ
return nil, err
}

return Convert(result), nil
return convert(result), nil
}

func (c *Client) generate(ctx context.Context, in *openapi.OrganizationWrite) (*unikornv1.Organization, error) {
Expand Down Expand Up @@ -258,5 +258,5 @@ func (c *Client) Create(ctx context.Context, request *openapi.OrganizationWrite)
return nil, errors.OAuth2ServerError("failed to create organization").WithError(err)
}

return Convert(org), nil
return convert(org), nil
}
1 change: 0 additions & 1 deletion pkg/middleware/openapi/local/authorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func NewAuthorizer(authenticator *oauth2.Authenticator, rbac *rbac.RBAC) *Author
// Authorization header.
func getHTTPAuthenticationScheme(r *http.Request) (string, string, error) {
header := r.Header.Get("Authorization")

if header == "" {
return "", "", errors.OAuth2InvalidRequest("authorization header missing")
}
Expand Down
20 changes: 0 additions & 20 deletions pkg/openapi/server.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1218,26 +1218,6 @@ components:
example:
state: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
email: joe.bloggs@acme.com
createAccountRequest:
description: Body required to create a group.
required: true
content:
application/json:
schema:
type: object
required:
- adminUser
- organizationName
properties:
adminUser:
type: string
description: The email address of the initial admin user
organizationName:
type: string
description: The name of the organization
example:
adminUser: "admin@acme.com"
organizationName: "acme-corp"
tokenRequest:
description: OAuth2 token request, consult the relevant OAuth2 and OIDC specifications for further details.
required: true
Expand Down

0 comments on commit 8f1537e

Please sign in to comment.