-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
Access Key, etc still required for Storage access when using use_iam_profile #162
Comments
@fcheung I've never actually used this feature myself, any chance you have some ideas or suggestions about what is going on here? I think if it worked it should fill those keys in before the check, but maybe I'm missing something. |
It works fine. It's just odd that it requires the access key id and secret access key fields to be supplied (even though I just give it blank strings) I think the problem is this line in
these parameters should not be required if |
Ah, that's good to know (but agreed it is weird). I guess maybe we expect that in many cases you would provide credentials in the first place and then use this to override them maybe? I think the require is ok, but it does need to happen in a particular order (ie the use_iam_profile part would need to be processed to get creds and THEN they would get checked). Guess maybe we aren't there presently though, not sure how hard it would be to fix, but at least with this we acknowledge it and maybe others can find this to help them understand. |
yup, i think this is a useful note in case others run into the same problem |
That's weird - I use this all the time and have never needed the blank arguments (unless something has changed recently. ) |
@fcheung do you use it with ec2 commands or with s3? I was wondering if maybe there was something different between the two. |
I've used both - i've got stuff like
litterally all over the codebase where that credentials object returns something like
The fetch_credentials method from the base service class is overriden to do the lookup so you shouldn't need blank strings any more than you would if you were loading them from .fog (validation happens after this see https://github.com/fog/fog-core/blob/master/lib/fog/core/service.rb#L268 ) |
Weird, thanks for the clarification. |
@pghalliday maybe ensure you have latest versions of fog/fog-core/fog-aws? That said, I don't recall this changing any time recently. |
@geemus I haven't checked the latest version, I ran into this while trying to configure gitlab which has all this stuff embedded so it's not trivial to update. If i can validate that this works correctly in the latest version, I'll raise an issue over on the gitlab project. Thanks |
Sounds good, thanks! |
Sorry to comment on a closed issue, but this issue is still present as noted on my GitLab installation which uses fog 1.42.0. Any help would be greatly appreciated Cheers |
We are using fog 1.4.0 in GitLab, and it appears the workaround to specify a blank access ID and key does work. I think #162 (comment) is spot on that these parameters should be optional if IAM profiles are being used:
|
@stanhu Sounds like you are you using GitLab 9.5.0. Gitlab 9.5.0 upgraded to fog-aws to 1.4.0. I've been using GitLab for a while with blank access ID and key and Was there anything you had to change in your gitlab.rb? |
Looks like blank access ID and key are no longer required with use_iam_profile set to true. |
@oyarzun Thanks, I think I was looking at the wrong version. GitLab 9.4 uses fog-aws 0.13.0, and it sounds like the upgrade to fog-aws 1.4.0 requires omitting blank values: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13871 |
Unfortunately, I haven't done much with iam profiles (at least recently). @lanej any chance you are more current and could advise? Thanks! |
i had to go to delete a line in rake file to resolve this issue..../usr/local/rvm/gems/ruby-2.5.3/gems/rake-11.3.0/exe |
it was |
@khalfanathman Thanks for the detail. |
This might be a duplicate of #44 but I have found that when using the
use_iam_profile
option with the Storage API:I still have to provide the access key id and secret access key (even if only as empty strings) or I get the following error:
You can see that I'm using version 1.3.0 of fog with Gitlab
This was confusing for a while...
The text was updated successfully, but these errors were encountered: