You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AWS CLI (and other tooling) allows profile names to contain dots (e.g. myprofile.admin). Leapp seems to support dot-delimited profile names too, except for when the profile is written to the credentials file, the dots are escaped (e.g. myprofile\.admin). While this may seem perfectly valid, the AWS CLI fails to load the profile with the unescaped name.
I've done some digging and the issue is not strictly a Leapp problem. The escaping is done in ini lib when the credential file is written here. Up until that point, the profile name is correctly unescaped. It seems that the ini lib does support unescaped dots in section headers, but only for nested keys.
Leapp Version
0.17.1
To Reproduce
Steps to reproduce the behavior:
Create an AWS session with the named profile myprofile.admin
Start the session
Attempt to use the profile using aws sts get-caller-identity --profile myprofile.admin
Observe the error: The config profile (myprofile.admin) could not be found
Expected behavior
The profile should be found and the identity of the authenticated user should be returned.
Desktop (please complete the following information):
OS: macOS
OS Version: 13.2
Leapp Version: 0.17.1
Additional context
It's not super clear where this should be fixed. One option would be for Leapp to convert dot-delimited profile names into nested objects. Another option would be to try to fix this upstream in the ini library by introduce a new encode option.
I'd be happy to contribute a fix, but I'm curious which approach is preferred.
Describe the bug
The AWS CLI (and other tooling) allows profile names to contain dots (e.g.
myprofile.admin
). Leapp seems to support dot-delimited profile names too, except for when the profile is written to thecredentials
file, the dots are escaped (e.g.myprofile\.admin
). While this may seem perfectly valid, the AWS CLI fails to load the profile with the unescaped name.I've done some digging and the issue is not strictly a Leapp problem. The escaping is done in ini lib when the credential file is written here. Up until that point, the profile name is correctly unescaped. It seems that the
ini
lib does support unescaped dots in section headers, but only for nested keys.Leapp Version
0.17.1
To Reproduce
Steps to reproduce the behavior:
myprofile.admin
aws sts get-caller-identity --profile myprofile.admin
The config profile (myprofile.admin) could not be found
Expected behavior
The profile should be found and the identity of the authenticated user should be returned.
Desktop (please complete the following information):
Additional context
It's not super clear where this should be fixed. One option would be for Leapp to convert dot-delimited profile names into nested objects. Another option would be to try to fix this upstream in the
ini
library by introduce a newencode
option.I'd be happy to contribute a fix, but I'm curious which approach is preferred.
Some related issues:
The text was updated successfully, but these errors were encountered: