From 5e3af1be94af31c10294afbd4d6e7b274431a4ec Mon Sep 17 00:00:00 2001 From: Bryan Apellanes Date: Tue, 5 Nov 2024 08:55:30 -0600 Subject: [PATCH 1/4] update IdentityModel components to address vulnerability --- API_README.md | 2 +- openapi3/config.json | 2 +- openapi3/templates/netcore_project.mustache | 4 ++-- src/Okta.Sdk/Client/Configuration.cs | 4 ++-- src/Okta.Sdk/Okta.Sdk.csproj | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/API_README.md b/API_README.md index ad4421f3..7543985e 100644 --- a/API_README.md +++ b/API_README.md @@ -5,7 +5,7 @@ Allows customers to easily access the Okta Management APIs This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 2024.07.0 -- SDK version: 9.0.0 +- SDK version: 9.0.1 - Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit [https://developer.okta.com/](https://developer.okta.com/) diff --git a/openapi3/config.json b/openapi3/config.json index 3d60a314..4530ef07 100644 --- a/openapi3/config.json +++ b/openapi3/config.json @@ -6,7 +6,7 @@ "packageName" : "Okta.Sdk", "outputDir" : "../", "inputSpec" : "./management.yaml", - "packageVersion" : "9.0.0", + "packageVersion" : "9.0.1", "packageDescription" : "Official .NET SDK for the Okta API", "packageTitle" : "Official .NET SDK for the Okta API", "packageCompany" : "Okta, Inc.", diff --git a/openapi3/templates/netcore_project.mustache b/openapi3/templates/netcore_project.mustache index cea62c04..98dd09cb 100644 --- a/openapi3/templates/netcore_project.mustache +++ b/openapi3/templates/netcore_project.mustache @@ -32,8 +32,8 @@ - - + + {{/useGenericHost}} {{#useRestSharp}} diff --git a/src/Okta.Sdk/Client/Configuration.cs b/src/Okta.Sdk/Client/Configuration.cs index df5b64f8..eed0e5e1 100644 --- a/src/Okta.Sdk/Client/Configuration.cs +++ b/src/Okta.Sdk/Client/Configuration.cs @@ -39,7 +39,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "9.0.0"; + public const string Version = "9.0.1"; /// /// Identifier for ISO 8601 DateTime Format @@ -766,7 +766,7 @@ public static string ToDebugReport() report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; report += " Version of the API: 2024.07.0\n"; - report += " SDK Package Version: 9.0.0\n"; + report += " SDK Package Version: 9.0.1\n"; return report; } diff --git a/src/Okta.Sdk/Okta.Sdk.csproj b/src/Okta.Sdk/Okta.Sdk.csproj index c981e8fe..fc8206e9 100644 --- a/src/Okta.Sdk/Okta.Sdk.csproj +++ b/src/Okta.Sdk/Okta.Sdk.csproj @@ -13,7 +13,7 @@ Official .NET SDK for the Okta API Okta, Inc. Okta.Sdk - 9.0.0 + 9.0.1 bin\$(Configuration)\$(TargetFramework)\Okta.Sdk.xml LICENSE True @@ -27,8 +27,8 @@ - - + + From 3171912a579e5e23cf00945aaca1187a277e4e24 Mon Sep 17 00:00:00 2001 From: Bryan Apellanes Date: Fri, 8 Nov 2024 09:55:36 -0600 Subject: [PATCH 2/4] explicitly reference System.Text.Json 8.0.5 --- openapi3/templates/netcore_project.mustache | 1 + src/Okta.Sdk.UnitTest/Okta.Sdk.UnitTest.csproj | 2 +- src/Okta.Sdk/Okta.Sdk.csproj | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openapi3/templates/netcore_project.mustache b/openapi3/templates/netcore_project.mustache index 98dd09cb..646a6459 100644 --- a/openapi3/templates/netcore_project.mustache +++ b/openapi3/templates/netcore_project.mustache @@ -34,6 +34,7 @@ + {{/useGenericHost}} {{#useRestSharp}} diff --git a/src/Okta.Sdk.UnitTest/Okta.Sdk.UnitTest.csproj b/src/Okta.Sdk.UnitTest/Okta.Sdk.UnitTest.csproj index 40af89ff..06681b87 100644 --- a/src/Okta.Sdk.UnitTest/Okta.Sdk.UnitTest.csproj +++ b/src/Okta.Sdk.UnitTest/Okta.Sdk.UnitTest.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/Okta.Sdk/Okta.Sdk.csproj b/src/Okta.Sdk/Okta.Sdk.csproj index fc8206e9..2f188627 100644 --- a/src/Okta.Sdk/Okta.Sdk.csproj +++ b/src/Okta.Sdk/Okta.Sdk.csproj @@ -29,6 +29,7 @@ + From 9180fdd2efe6322535a56c5d826731876a53e6f6 Mon Sep 17 00:00:00 2001 From: Bryan Apellanes Date: Tue, 12 Nov 2024 07:52:09 -0600 Subject: [PATCH 3/4] fix AuthorizationServerPolicy definition --- .openapi-generator/FILES | 2 + API_README.md | 1 + docs/AuthorizationServerPolicy.md | 10 + openapi3/management.yaml | 47 ++++ .../Model/AuthorizationServerPolicy.cs | 206 ++++++++++++++++++ .../Model/AuthorizationServerPolicyStatus.cs | 61 ++++++ 6 files changed, 327 insertions(+) create mode 100644 src/Okta.Sdk/Model/AuthorizationServerPolicyStatus.cs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index c1292961..9d44d00f 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -171,6 +171,7 @@ docs/AuthorizationServerPolicyRuleActions.md docs/AuthorizationServerPolicyRuleConditions.md docs/AuthorizationServerPolicyRuleGroupCondition.md docs/AuthorizationServerPolicyRuleUserCondition.md +docs/AuthorizationServerPolicyStatus.md docs/AuthorizationServerRulesApi.md docs/AuthorizationServerScopesApi.md docs/AutoAssignAdminAppSetting.md @@ -1520,6 +1521,7 @@ src/Okta.Sdk/Model/AuthorizationServerPolicyRuleActions.cs src/Okta.Sdk/Model/AuthorizationServerPolicyRuleConditions.cs src/Okta.Sdk/Model/AuthorizationServerPolicyRuleGroupCondition.cs src/Okta.Sdk/Model/AuthorizationServerPolicyRuleUserCondition.cs +src/Okta.Sdk/Model/AuthorizationServerPolicyStatus.cs src/Okta.Sdk/Model/AutoAssignAdminAppSetting.cs src/Okta.Sdk/Model/AutoLoginApplication.cs src/Okta.Sdk/Model/AutoLoginApplicationSettings.cs diff --git a/API_README.md b/API_README.md index 7543985e..8d7f2ed6 100644 --- a/API_README.md +++ b/API_README.md @@ -797,6 +797,7 @@ Class | Method | HTTP request | Description - [Model.AuthorizationServerPolicyRuleConditions](docs/AuthorizationServerPolicyRuleConditions.md) - [Model.AuthorizationServerPolicyRuleGroupCondition](docs/AuthorizationServerPolicyRuleGroupCondition.md) - [Model.AuthorizationServerPolicyRuleUserCondition](docs/AuthorizationServerPolicyRuleUserCondition.md) + - [Model.AuthorizationServerPolicyStatus](docs/AuthorizationServerPolicyStatus.md) - [Model.AutoAssignAdminAppSetting](docs/AutoAssignAdminAppSetting.md) - [Model.AutoLoginApplication](docs/AutoLoginApplication.md) - [Model.AutoLoginApplicationAllOf](docs/AutoLoginApplicationAllOf.md) diff --git a/docs/AuthorizationServerPolicy.md b/docs/AuthorizationServerPolicy.md index c1ecbdb6..251c44f9 100644 --- a/docs/AuthorizationServerPolicy.md +++ b/docs/AuthorizationServerPolicy.md @@ -4,7 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID of the Policy | [optional] +**Type** | **string** | Indicates that the Policy is an authorization server Policy | [optional] +**Name** | **string** | Name of the Policy | [optional] **Conditions** | [**AuthorizationServerPolicyConditions**](AuthorizationServerPolicyConditions.md) | | [optional] +**Description** | **string** | Description of the Policy | [optional] +**Priority** | **int** | Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server | [optional] +**Status** | **AuthorizationServerPolicyStatus** | | [optional] +**System** | **bool** | Specifies whether Okta created this Policy | [optional] +**Created** | **DateTimeOffset** | Timestamp when the Policy was created | [optional] [readonly] +**LastUpdated** | **DateTimeOffset** | Timestamp when the Policy was last updated | [optional] [readonly] +**Links** | [**LinksSelfAndLifecycle**](LinksSelfAndLifecycle.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/openapi3/management.yaml b/openapi3/management.yaml index 897aebc2..426e468a 100644 --- a/openapi3/management.yaml +++ b/openapi3/management.yaml @@ -32849,6 +32849,12 @@ components: - none - recovery - sso + AuthorizationServerPolicyStatus: + description: The allowed statuses for the AurhorizationServerPolicy + type: string + enum: + - ACTIVE + - INACTIVE ApiToken: title: API Token description: An API token for an Okta User. This token is NOT scoped any further and can be used for any API the user has permissions to call. @@ -34301,8 +34307,49 @@ components: allOf: - type: object properties: + id: + type: string + description: ID of the Policy + type: + type: string + description: Indicates that the Policy is an authorization server Policy + enum: + - OAUTH_AUTHORIZATION_POLICY + name: + type: string + description: Name of the Policy conditions: $ref: '#/components/schemas/AuthorizationServerPolicyConditions' + description: + type: string + description: Description of the Policy + priority: + type: integer + description: Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server + status: + $ref: '#/components/schemas/AuthorizationServerPolicyStatus' + system: + type: boolean + description: Specifies whether Okta created this Policy + created: + type: string + format: date-time + readOnly: true + description: Timestamp when the Policy was created + lastUpdated: + type: string + format: date-time + readOnly: true + description: Timestamp when the Policy was last updated + _links: + allOf: + - $ref: '#/components/schemas/LinksSelfAndLifecycle' + - type: object + properties: + rules: + allOf: + - description: Link to the authorization server policy's rules + - $ref: '#/components/schemas/HrefObject' AuthorizationServerPolicyConditions: type: object properties: diff --git a/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs b/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs index 605a0f5b..39930d1c 100644 --- a/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs +++ b/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs @@ -33,13 +33,129 @@ namespace Okta.Sdk.Model public partial class AuthorizationServerPolicy : IEquatable { + /// + /// Indicates that the Policy is an authorization server Policy + /// + /// Indicates that the Policy is an authorization server Policy + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class TypeEnum : StringEnum + { + /// + /// StringEnum OAUTHAUTHORIZATIONPOLICY for value: OAUTH_AUTHORIZATION_POLICY + /// + + public static TypeEnum OAUTHAUTHORIZATIONPOLICY = new TypeEnum("OAUTH_AUTHORIZATION_POLICY"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator TypeEnum(string value) => new TypeEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public TypeEnum(string value) + : base(value) + { + } + } + + + /// + /// Indicates that the Policy is an authorization server Policy + /// + /// Indicates that the Policy is an authorization server Policy + [DataMember(Name = "type", EmitDefaultValue = true)] + public TypeEnum Type { get; set; } + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = true)] + + public AuthorizationServerPolicyStatus Status { get; set; } + + /// + /// ID of the Policy + /// + /// ID of the Policy + [DataMember(Name = "id", EmitDefaultValue = true)] + public string Id { get; set; } + + /// + /// Name of the Policy + /// + /// Name of the Policy + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + /// /// Gets or Sets Conditions /// [DataMember(Name = "conditions", EmitDefaultValue = true)] public AuthorizationServerPolicyConditions Conditions { get; set; } + /// + /// Description of the Policy + /// + /// Description of the Policy + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } + + /// + /// Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server + /// + /// Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server + [DataMember(Name = "priority", EmitDefaultValue = true)] + public int Priority { get; set; } + + /// + /// Specifies whether Okta created this Policy + /// + /// Specifies whether Okta created this Policy + [DataMember(Name = "system", EmitDefaultValue = true)] + public bool System { get; set; } + + /// + /// Timestamp when the Policy was created + /// + /// Timestamp when the Policy was created + [DataMember(Name = "created", EmitDefaultValue = true)] + public DateTimeOffset Created { get; private set; } + + /// + /// Returns false as Created should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeCreated() + { + return false; + } + /// + /// Timestamp when the Policy was last updated + /// + /// Timestamp when the Policy was last updated + [DataMember(Name = "lastUpdated", EmitDefaultValue = true)] + public DateTimeOffset LastUpdated { get; private set; } + + /// + /// Returns false as LastUpdated should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeLastUpdated() + { + return false; + } + /// + /// Gets or Sets Links + /// + [DataMember(Name = "_links", EmitDefaultValue = true)] + public LinksSelfAndLifecycle Links { get; set; } + /// /// Returns the string presentation of the object /// @@ -48,7 +164,17 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AuthorizationServerPolicy {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Conditions: ").Append(Conditions).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Priority: ").Append(Priority).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" System: ").Append(System).Append("\n"); + sb.Append(" Created: ").Append(Created).Append("\n"); + sb.Append(" LastUpdated: ").Append(LastUpdated).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -84,10 +210,56 @@ public bool Equals(AuthorizationServerPolicy input) return false; } return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && ( this.Conditions == input.Conditions || (this.Conditions != null && this.Conditions.Equals(input.Conditions)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Priority == input.Priority || + this.Priority.Equals(input.Priority) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.System == input.System || + this.System.Equals(input.System) + ) && + ( + this.Created == input.Created || + (this.Created != null && + this.Created.Equals(input.Created)) + ) && + ( + this.LastUpdated == input.LastUpdated || + (this.LastUpdated != null && + this.LastUpdated.Equals(input.LastUpdated)) + ) && + ( + this.Links == input.Links || + (this.Links != null && + this.Links.Equals(input.Links)) ); } @@ -101,10 +273,44 @@ public override int GetHashCode() { int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Type != null) + { + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } if (this.Conditions != null) { hashCode = (hashCode * 59) + this.Conditions.GetHashCode(); } + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Priority.GetHashCode(); + if (this.Status != null) + { + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + } + hashCode = (hashCode * 59) + this.System.GetHashCode(); + if (this.Created != null) + { + hashCode = (hashCode * 59) + this.Created.GetHashCode(); + } + if (this.LastUpdated != null) + { + hashCode = (hashCode * 59) + this.LastUpdated.GetHashCode(); + } + if (this.Links != null) + { + hashCode = (hashCode * 59) + this.Links.GetHashCode(); + } return hashCode; } } diff --git a/src/Okta.Sdk/Model/AuthorizationServerPolicyStatus.cs b/src/Okta.Sdk/Model/AuthorizationServerPolicyStatus.cs new file mode 100644 index 00000000..ad521e90 --- /dev/null +++ b/src/Okta.Sdk/Model/AuthorizationServerPolicyStatus.cs @@ -0,0 +1,61 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 2024.07.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// The allowed statuses for the AurhorizationServerPolicy + /// + /// The allowed statuses for the AurhorizationServerPolicy + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class AuthorizationServerPolicyStatus : StringEnum + { + /// + /// StringEnum AuthorizationServerPolicyStatus for value: ACTIVE + /// + public static AuthorizationServerPolicyStatus ACTIVE = new AuthorizationServerPolicyStatus("ACTIVE"); + /// + /// StringEnum AuthorizationServerPolicyStatus for value: INACTIVE + /// + public static AuthorizationServerPolicyStatus INACTIVE = new AuthorizationServerPolicyStatus("INACTIVE"); + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator AuthorizationServerPolicyStatus(string value) => new AuthorizationServerPolicyStatus(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public AuthorizationServerPolicyStatus(string value) + : base(value) + { + } + } + + +} From 2fa3b796e118f7b483360e83bfa3807a43e2fab4 Mon Sep 17 00:00:00 2001 From: Bryan Apellanes Date: Tue, 12 Nov 2024 08:16:46 -0600 Subject: [PATCH 4/4] add doc --- docs/AuthorizationServerPolicyStatus.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/AuthorizationServerPolicyStatus.md diff --git a/docs/AuthorizationServerPolicyStatus.md b/docs/AuthorizationServerPolicyStatus.md new file mode 100644 index 00000000..230e21f8 --- /dev/null +++ b/docs/AuthorizationServerPolicyStatus.md @@ -0,0 +1,10 @@ +# Okta.Sdk.Model.AuthorizationServerPolicyStatus +The allowed statuses for the AurhorizationServerPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) +