Skip to content

Commit

Permalink
Merge pull request #706 from gdbranco/fix/sda-7890-adjust-api-oidc-co…
Browse files Browse the repository at this point in the history
…nfigs

[SDA-7890] Adjust resources to match /oidc_configs endpoints
  • Loading branch information
gdbranco authored Mar 17, 2023
2 parents 88d746a + 2fa6c79 commit 89e0d91
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 56 deletions.
42 changes: 0 additions & 42 deletions model/clusters_mgmt/v1/hosted_oidc_config_type.model

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Manages a hosted oidc configuration.
resource HostedOidcConfig {
// Retrieves the details of a HostedOidcConfig
// Manages an Oidc Config configuration.
resource OidcConfig {
// Retrieves the details of an OidcConfig.
method Get {
out Body HostedOidcConfig
out Body OidcConfig
}

// Deletes the HostedOidcConfig.
// Updates attributes of an OidcConfig.
method Update {
in out Body OidcConfig
}

// Deletes the OidcConfig.
method Delete {
}
}
51 changes: 51 additions & 0 deletions model/clusters_mgmt/v1/oidc_config_type.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
Copyright (c) 2023 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Contains the necessary attributes to support oidc configuration hosting under Red Hat or registering a Customer's byo oidc config.
struct OidcConfig {
// ARN of the AWS role to assume when installing the cluster as to reveal the secret, supplied in request. It is only to be used in Unmanaged Oidc Config.
InstallerRoleArn String

// Secrets Manager ARN for the OIDC private key, supplied in request. It is only to be used in Unmanaged Oidc Config.
SecretArn String

// ID for the oidc config, filled in response.
ID String

// HREF for the oidc config, filled in response.
HREF String

// Organization ID, filled in response respecting token provided.
OrganizationId String

// Issuer URL, filled in response when Managed and supplied in Unmanaged.
IssuerUrl String

// Creation timestamp, filled in response.
CreationTimestamp Date

// Last used timestamp, filled by the latest cluster that used this oidc config.
LastUsedTimestamp Date

// Last update timestamp, filled when patching a valid attribute of this oidc config.
LastUpdateTimestamp Date

// Indicates whether it is Managed or Unmanaged (Customer hosted).
Managed boolean

// Indicates whether the Oidc Config can be reused.
Reusable boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Manages the collection hosted oidc configurations.
resource HostedOidcConfigs {
// Retrieves the list of hosted oidc configs.
// Manages the collection of oidc configurations.
resource OidcConfigs {
// Retrieves the list of oidc configs.
method List {
// Index of the requested page, where one corresponds to the first page.
in out Page Integer = 1
Expand All @@ -28,18 +28,18 @@ resource HostedOidcConfigs {
out Total Integer

// Retrieved list of identity providers.
out Items []HostedOidcConfig
out Items []OidcConfig
}


// Creates a hosting under Red Hat's S3 bucket for byo oidc configuration
method Add {
in out Body HostedOidcConfig
in out Body OidcConfig
}

// Reference to the service that manages an specific identity provider.
locator HostedOidcConfig {
target HostedOidcConfig
locator OidcConfig {
target OidcConfig
variable ID
}
}
4 changes: 2 additions & 2 deletions model/clusters_mgmt/v1/root_resource.model
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ resource Root {
}

// Reference to the resource that manages oidc
locator HostedOidcConfigs {
target HostedOidcConfigs
locator OidcConfigs {
target OidcConfigs
}
}

0 comments on commit 89e0d91

Please sign in to comment.