-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS Provider for OCI Does not account for disconnected AWS partitions #832
Comments
I understand that an alternative path to implementing this would be to expand the regex to include these disconnected partitions, but it seems like there is a bigger discussion that should happen around this. |
After further investigation, it looks like this happens because the regex tries to pull the region out of the URL. |
Hi, this was discussed in the flux dev meeting recently. The auth package originated in image-reflector-controller (IRC) several years ago. IRC was the only flux component that performed authentication with cloud providers. The initial design was such that cluster admins can set autologin flags to enable authentication to certain cloud providers, which allowed ImageRepositories to connect to the cloud provider registries based on the URL. IRC parsed the URL and determined which cloud provider to authenticate with if autologin was enabled for the provider. There was no In order to respect the specified In the dev meeting, everybody agreed with this change, but we don't have anyone working on this at present. I believe we can accept a temporary fix to allow the use case described in this issue by modifying the AWS URL parsing regular expression for now. A proper fix as described above would be ideal for the long term. I hope this provides all the background for why things are this way today. |
oci/auth/aws/auth.go::40
This regular expression is used to determine if flux should try to authenticate to the AWS API when pulling an OCI resource. However, this regex does not support some other AWS regions, notably disconnected AWS partitions.
Thus, flux does not detect that it is in AWS and fails due to missing username/password.
Why is this implemented as such? If the user is already forced to specify
provider: aws
onhelmrepositories
for example, why does flux still parse the URL instead of de-facto authenticating?I recommend removing this check and assuming the OCI endpoint requires AWS authentication if the user specifies
provider: aws
regardless of the URL. If the user in error specifiesprovider: aws
for a non-AWS-backed OCI repo, then flux should fail.The text was updated successfully, but these errors were encountered: