Using Octopus.Client 4.36.3 and Octopus Server 2018.1.3 we had trouble fetching API keys for a user:
Exception calling “GetApiKeys” with “1” argument(s): “The resource ‘apikeys’ was not found.”
After much digging we found the problem:
- The user has 30+ API keys (automatically created on demand) which triggers paging
- The “Page.All/Next/Current/Last” links are broken in REST API which causes the error
Example of broken links:
See the “//”? Users-64 is missing! Definitely a bug if you ask me.
Thanks for reaching out. Bug indeed! I’ve created a github issue for it which you can follow to get notified when we ship a fix: https://github.com/OctopusDeploy/Issues/issues/4608
Thanks for taking the time to report this . Highly possible that you are the first user ever to create more than 30 API keys for a single user.
You’re welcome! Thank’s for making it easy to report bugs - and for the positive attitude upon receiving them.
If we’re the first ones hitting the 30 key limit - are we doing something wrong? The use case is that we have automated setup of deployment pipelines involving both SCM, CI and deploy tools (the latter being OD). To give CI server access to OD for pushing packages we generate API keys and store them in the CI server. An alternative would be to generate unique service accounts for each pipeline.
What’s currently stopping you from having a unique service account with a unique API Key? I just want to make sure I understand your scenario properly
BTW we’ve merged a fix for this which should go out in the next release https://github.com/OctopusDeploy/Issues/issues/4608
Nothing really stopping us from creating unique service accounts as it would be automated as well. We took the path with multiple API keys as we didn’t want to clutter the user directory with a lot of service accounts. As mentioned above, the need is merely to be able to have an API key in order to push packages to Octopus.
Thanks for the update! Glad we could help!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.