Skip to content

Commit c9a79ca

Browse files
authored
Enable SSO by default (#2076)
1 parent 8d550f9 commit c9a79ca

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "feature",
3+
"description" : "Add support for AWS SSO based credential profiles"
4+
}

core/src/software/aws/toolkits/core/credentials/sso/SsoProfileProperty.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ const val SSO_URL = "sso_start_url"
77
const val SSO_REGION = "sso_region"
88
const val SSO_ACCOUNT = "sso_account_id"
99
const val SSO_ROLE_NAME = "sso_role_name"
10-
11-
const val SSO_EXPERIMENTAL_REGISTRY_KEY = "aws.sso.enabled"

jetbrains-core/resources/META-INF/plugin.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@
222222
<fileEditorProvider implementation="software.aws.toolkits.jetbrains.services.s3.S3ViewerEditorProvider"/>
223223
<!-- See this post why order="first" is required https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003460619-fileIconProvider-is-not-showing-Icon-for-custom-LightVirtualFile -->
224224
<fileIconProvider order="first" implementation="software.aws.toolkits.jetbrains.services.s3.editor.S3FileIconProvider"/>
225-
<registryKey key="aws.sso.enabled" description="(Experimental) Enable SSO AWS Credentials" restartRequired="true" defaultValue="false"/>
226225
<registryKey key="aws.credentialProcess.timeout" description="AWS Credential Process timeout (ms)" restartRequired="false" defaultValue="30000"/>
227226
</extensions>
228227

jetbrains-core/src/software/aws/toolkits/jetbrains/core/credentials/profiles/ProfileCredentialProviderFactory.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package software.aws.toolkits.jetbrains.core.credentials.profiles
55

66
import com.intellij.openapi.actionSystem.ActionManager
7-
import com.intellij.openapi.util.registry.Registry
87
import software.amazon.awssdk.auth.credentials.AnonymousCredentialsProvider
98
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials
109
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider
@@ -26,7 +25,6 @@ import software.aws.toolkits.core.credentials.CredentialProviderFactory
2625
import software.aws.toolkits.core.credentials.CredentialsChangeEvent
2726
import software.aws.toolkits.core.credentials.CredentialsChangeListener
2827
import software.aws.toolkits.core.credentials.sso.SSO_ACCOUNT
29-
import software.aws.toolkits.core.credentials.sso.SSO_EXPERIMENTAL_REGISTRY_KEY
3028
import software.aws.toolkits.core.credentials.sso.SSO_REGION
3129
import software.aws.toolkits.core.credentials.sso.SSO_ROLE_NAME
3230
import software.aws.toolkits.core.credentials.sso.SSO_URL
@@ -186,7 +184,7 @@ class ProfileCredentialProviderFactory : CredentialProviderFactory {
186184
}
187185

188186
private fun createAwsCredentialProvider(profile: Profile, region: AwsRegion, sdkHttpClientSupplier: () -> SdkHttpClient) = when {
189-
profile.propertyExists(SSO_URL) && Registry.`is`(SSO_EXPERIMENTAL_REGISTRY_KEY) -> createSsoProvider(profile, sdkHttpClientSupplier)
187+
profile.propertyExists(SSO_URL) -> createSsoProvider(profile, sdkHttpClientSupplier)
190188
profile.propertyExists(ProfileProperty.ROLE_ARN) -> createAssumeRoleProvider(profile, region, sdkHttpClientSupplier)
191189
profile.propertyExists(ProfileProperty.AWS_SESSION_TOKEN) -> createStaticSessionProvider(profile)
192190
profile.propertyExists(ProfileProperty.AWS_ACCESS_KEY_ID) -> createBasicProvider(profile)

jetbrains-core/src/software/aws/toolkits/jetbrains/core/credentials/profiles/ProfileReader.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33

44
package software.aws.toolkits.jetbrains.core.credentials.profiles
55

6-
import com.intellij.openapi.util.registry.Registry
76
import software.amazon.awssdk.profiles.Profile
87
import software.amazon.awssdk.profiles.ProfileFile
98
import software.amazon.awssdk.profiles.ProfileProperty
109
import software.aws.toolkits.core.credentials.sso.SSO_ACCOUNT
11-
import software.aws.toolkits.core.credentials.sso.SSO_EXPERIMENTAL_REGISTRY_KEY
1210
import software.aws.toolkits.core.credentials.sso.SSO_REGION
1311
import software.aws.toolkits.core.credentials.sso.SSO_ROLE_NAME
1412
import software.aws.toolkits.core.credentials.sso.SSO_URL
@@ -39,7 +37,7 @@ fun validateAndGetProfiles(): Profiles {
3937

4038
private fun validateProfile(profile: Profile, allProfiles: Map<String, Profile>) {
4139
when {
42-
profile.propertyExists(SSO_URL) && Registry.`is`(SSO_EXPERIMENTAL_REGISTRY_KEY) -> validateSsoProfile(profile)
40+
profile.propertyExists(SSO_URL) -> validateSsoProfile(profile)
4341
profile.propertyExists(ProfileProperty.ROLE_ARN) -> validateAssumeRoleProfile(profile, allProfiles)
4442
profile.propertyExists(ProfileProperty.AWS_SESSION_TOKEN) -> validateStaticSessionProfile(profile)
4543
profile.propertyExists(ProfileProperty.AWS_ACCESS_KEY_ID) -> validateBasicProfile(profile)

0 commit comments

Comments
 (0)