Skip to content

Commit

Permalink
Merge pull request #11 from Keyfactor/release-1.2
Browse files Browse the repository at this point in the history
merge release 1.2 to main
  • Loading branch information
fiddlermikey authored Jan 29, 2024
2 parents f633b1a + 8842a50 commit 5c0e8e4
Show file tree
Hide file tree
Showing 13 changed files with 625 additions and 304 deletions.
16 changes: 15 additions & 1 deletion AWSOktaTester/Models/AuthResponse.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using Newtonsoft.Json;
// Copyright 2023 Keyfactor
//
// 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.

using Newtonsoft.Json;

namespace AWSOktaTester.Models
{
Expand Down
16 changes: 15 additions & 1 deletion AWSOktaTester/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using System;
// Copyright 2023 Keyfactor
//
// 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.

using System;
using System.Text;
using Amazon;
using Amazon.CertificateManager;
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
1.2.0
* Added OTKA Auth Path to support Authentication Servers outside of the default server.

1.1.0
* Added AWS IAM Authentication support with Roles

1.0.0
* Convert to Universal Orchestrator Framework
* Added OKTA Authentication Support
280 changes: 144 additions & 136 deletions README.md

Large diffs are not rendered by default.

20 changes: 18 additions & 2 deletions aws-orchestrator-core/CustomFields.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
using System;
using System.ComponentModel;
// Copyright 2023 Keyfactor
//
// 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.

using System.ComponentModel;
using Newtonsoft.Json;

namespace Keyfactor.AnyAgent.AwsCertificateManager
Expand All @@ -25,6 +37,10 @@ public class OktaCustomFields : CustomFields
[JsonProperty("scope")]
[DefaultValue(false)]
public string Scope { get; set; }

[JsonProperty("oauthpath")]
[DefaultValue("/oauth2/default/v1/token")]
public string OAuthPath { get; set; }
}

public class IAMCustomFields : CustomFields
Expand Down
23 changes: 15 additions & 8 deletions aws-orchestrator-core/Jobs/IAM/Inventory.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
using Amazon;
// Copyright 2023 Keyfactor
//
// 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.

using Amazon;
using Amazon.CertificateManager;
using Amazon.CertificateManager.Model;
using Amazon.Runtime.Internal.Util;
using Amazon.SecurityToken.Model;

using Keyfactor.AnyAgent.AwsCertificateManager.Models;
using Keyfactor.Logging;
using Keyfactor.Orchestrators.Common.Enums;
using Keyfactor.Orchestrators.Extensions;

using Microsoft.Extensions.Logging;

using Newtonsoft.Json;

using RestSharp;

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
24 changes: 15 additions & 9 deletions aws-orchestrator-core/Jobs/IAM/Management.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
using System;
// Copyright 2023 Keyfactor
//
// 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.

using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;

using Amazon;
using Amazon.CertificateManager;
using Amazon.CertificateManager.Model;
using Amazon.Runtime.Internal.Util;
using Amazon.SecurityToken.Model;

using Keyfactor.AnyAgent.AwsCertificateManager.Models;
using Keyfactor.Logging;
using Keyfactor.Orchestrators.Common.Enums;
using Keyfactor.Orchestrators.Extensions;

using Microsoft.Extensions.Logging;

using Newtonsoft.Json;

using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Pkcs;

using RestSharp;

namespace Keyfactor.AnyAgent.AwsCertificateManager.Jobs.IAM
{
public class Management : IManagementJobExtension
Expand Down
23 changes: 16 additions & 7 deletions aws-orchestrator-core/Jobs/Okta/Inventory.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
using Amazon;
// Copyright 2023 Keyfactor
//
// 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.

using Amazon;
using Amazon.CertificateManager;
using Amazon.CertificateManager.Model;
using Amazon.Runtime.Internal.Util;
using Amazon.SecurityToken.Model;

using Keyfactor.AnyAgent.AwsCertificateManager.Models;
using Keyfactor.Logging;
using Keyfactor.Orchestrators.Common.Enums;
using Keyfactor.Orchestrators.Extensions;

using Microsoft.Extensions.Logging;

using Newtonsoft.Json;

using RestSharp;

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -165,7 +174,7 @@ private AuthResponse OktaAuthenticate(InventoryJobConfiguration config)
try
{
_logger.MethodEntry();
var oktaAuthUrl = $"https://{config.CertificateStoreDetails.ClientMachine}/oauth2/default/v1/token";
var oktaAuthUrl = $"https://{config.CertificateStoreDetails.ClientMachine}{CustomFields.OAuthPath}";
_logger.LogTrace($"Custom Field List: {CustomFields}");
_logger.LogTrace($"Okta Auth URL: {oktaAuthUrl}");

Expand Down
23 changes: 16 additions & 7 deletions aws-orchestrator-core/Jobs/Okta/Management.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
using System;
// Copyright 2023 Keyfactor
//
// 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.

using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;

using Amazon;
using Amazon.CertificateManager;
using Amazon.CertificateManager.Model;
using Amazon.Runtime.Internal.Util;
using Amazon.SecurityToken.Model;

using Keyfactor.AnyAgent.AwsCertificateManager.Models;
using Keyfactor.Logging;
using Keyfactor.Orchestrators.Common.Enums;
using Keyfactor.Orchestrators.Extensions;

using Microsoft.Extensions.Logging;

using Newtonsoft.Json;

using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Pkcs;
Expand Down Expand Up @@ -311,7 +320,7 @@ private AuthResponse OktaAuthenticate(ManagementJobConfiguration config)
{
_logger.MethodEntry();

var oktaAuthUrl = $"https://{config.CertificateStoreDetails.ClientMachine}/oauth2/default/v1/token";
var oktaAuthUrl = $"https://{config.CertificateStoreDetails.ClientMachine}{CustomFields.OAuthPath}";
_logger.LogTrace($"Custom Field List: {CustomFields}");
_logger.LogTrace($"Okta Auth URL: {oktaAuthUrl}");

Expand Down
16 changes: 15 additions & 1 deletion aws-orchestrator-core/Models/AuthResponse.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using Newtonsoft.Json;
// Copyright 2023 Keyfactor
//
// 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.

using Newtonsoft.Json;

namespace Keyfactor.AnyAgent.AwsCertificateManager.Models
{
Expand Down
15 changes: 14 additions & 1 deletion aws-orchestrator-core/Utilities.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
using System;
// Copyright 2023 Keyfactor
//
// 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.

using System;
using Amazon;
using Amazon.Runtime;
using Amazon.Runtime.Internal.Util;
Expand Down
Loading

0 comments on commit 5c0e8e4

Please sign in to comment.