Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
Former Member
4 years agoDeploy a 1Password Connect server on Azure
I am trying to deploy a connect server on Azure and keep getting the log message
{"log_message":"(E) Server: (unable to get credentials and initialize API, retrying in 30s), Wrapped: (failed to FindCredentialsUniqueKey), Wrapped: (failed to loadCredentialsFile), Wrapped: (LoadLocalAuthV2 failed to credentialsDataFromDisk), open /home/opuser/.op/1password-credentials.json: no such file or directory","timestamp":"2021-12-03T16:43:37.100099966Z","level":1}
I have tried using file storage (blob and file) which only works at a directory level and then I get a "this is a directory not a file " error.
I have tried various full paths on the server and nothing seems to work. The error seems to being able to correctly point to the credentials file in the docker-compose.yaml
please help
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Referrer: forum-search:azure
- Former Member
We are working on improving the possibilities of using the 1Password CLI in these kinds of environments. As part of this, we are currently testing out a new service accounts feature in a small-scale private beta. If this is something you are interested in testing, you can sign up here.
- Former Member
So, fun times discovering that using the Connect Server approach is quite manual in terms of giving access to vaults, creating a new access token each time, etc.
Any chance you've tried putting the CLI into an Azure Web App? :-) - Former Member
You are welcome! Good to hear it's working now. Let me know if you run into anything else.
Joris
- Former Member
My own stuff-up with the access token there. Got it working, thank you!!!
- Former Member
Correct - that was my custom domain in the URL. And thank you for doing a better job of obfuscating my screenshot. :-)
I removed the 8080, and at least this time got an invalid bearer token error - so that means I was at least able to speak to the web app, so that's progress!
- Former Member
The command I'm issuing is: https://.azurewebsites.net:8080/v1/vaults
Looking at the screenshot, I am assuming that has your custom domain after https:// and before .azurewbesites?
- Does Power Automate return any error? If so, what does it return?
- Could you try the URL without :8080?
- What happens if you visit the /health route in your web browser? E.g. https://my-connect.azurewebsites.net/health
PS. I've edited your screenshot to mask it a bit better. Because Connect tokens are JSON, even sharing them partially could be problematic. I recommend revoking the current token.
- Former Member
Thanks @Joris_1P! The command I'm issuing is: https://
.azurewebsites.net:8080/v1/vaults
I'm calling it from Power Automate, this is what the flow looks like (apologies for the lame obfuscation attempt, using the tools I had in the moment) - Former Member
Hey @loryans! I have to be honest that I do not specifically remember what steps I followed back then. However, since you're saying that the logs say that Connect is ready, I think you followed the steps just right steps, but it might be that some steps were missing at the end (the original question asker already had some things set up, so I skipped those steps).
Could you let me know what command you are running to connect to it and what the error is that you're getting? That might point us in the direction of what is going wrong.
- Former Member
I've just come across this thread, and I'm unfortunately not a dev but I do have a decent head screwed on. :-)
@Joris_1P - can you please clarify, did you deploy a "Web App", or "Web App for Containers"? I couldn't tell from your post if your experimenting resulted in you using one or the other.
Also, the "op" folder - did you create that in the root of the storage of the app?
I deployed using just the "Web App", and according to the logs its ready to serve, but I can't seem to connect to it.
I used the docker compose from your example above.Thanks
- Former Member
On behalf of Joris, you are welcome @bretthenning! If you have any other questions, please feel free to reach out anytime.
Have a wonderful day :)