-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
AWSSigner/src/main/java/com/netspi/awssigner/model/persistence/FileProfileImporter.java
Line 25 in 204a457
| private static final Pattern awsProfileStartPattern = Pattern.compile("\\s*\\[(?:profile\\s)?(\\S+)\\]\\s*", Pattern.CASE_INSENSITIVE); |
The above line is used during the import process for profile files (either exported by AWS Signer, or from the ~/.aws/config file locally). The former supports profile names with spaces in them. However, importing these files breaks, with AWS Signer detecting no profiles in the file:
[DEBUG] Import Profile Button Clicked.
[DEBUG] Selected path from file dialog: /fake_path/aws_signer.ini
[INFO] Imported 0 profile(s) from file: /fake_path/aws_signer.iniHere's an example export file from AWS Signer that causes this:
[profile Foo: Bar]
signer_enabled=true
signer_in_scope_only=true
credential_process=/fake_path/bin/gimme --account foo --role bar
duration_seconds=60
[profile Foo external]
signer_enabled=true
signer_in_scope_only=true
role_arn=arn:aws:iam::123456789012:role/external
source_profile=Foo: Bar
role_session_name=aph3rson_external
[profile Foo: Baz]
signer_enabled=true
signer_in_scope_only=true
credential_process=/fake_path/bin/gimme --account foo --role baz
duration_seconds=60
[profile Creds: OhYes]
signer_enabled=true
signer_in_scope_only=true
credential_process=/fake_path/bin/gimme --account creds --role ohyes
duration_seconds=60It may be more appropriate to use an INI library for this - the ~/.aws/config file is INI-formatted, as mentioned here if that's what AWS Signer is shooting for.
Metadata
Metadata
Assignees
Labels
No labels