Comments (7)
Quick update, tried this with the v2023.1.0 cli to be certain of compatibility and get the same error.
from terraform-provider-bitwarden.
Hi @Magister-Machinis! Sorry for the late reply.
Thanks for providing those information. I need to think about it a bit more as I don't have a quick idea about what could be broken here.
from terraform-provider-bitwarden.
No worries! I added another log to the gist and made sure it had debug info if that is helpful. Let me know if any other info could be useful.
from terraform-provider-bitwarden.
Thanks again for the gist.
I was trying to play around the login command with my local Bitwarden client which is actually 2023.5.0. Interestingly, by entering non-sense as client_id
and client_secret
, I got the same result as you:
bw login --apikey
? client_id: bla
? client_secret: bla
Invalid API Key; Organization API Key currently not supported
More specifically, I got this error when using a client_id
value that wouldn't start with user.*
. Altering the client_id
or client_secret
but keeping the former prefixed with user.*
results in Invalid client_id
or Incorrect client_secret
errors, but nothing about organizations api keys.
Now I'm curious: if there is a dot in your client_id
, what's in front of it ?
It seems the error message you're seeing comes from a server-side validation, so I would think something is wrong with the client_id
:
- typo in the value
- value not set properly by the provider
- value not read properly by the cli
if I run bw.exe --apikey separately the login attempt is successful.
Could you try setting the BW_CLIENTID
and BW_CLIENTSECRET
environment variable, and then run bw.exe login --api-key
, like the provider does ? From a different angle, could you try hard-coding the values in the provider "bitwarden" {}
declaration, just in case ?
Thanks!
from terraform-provider-bitwarden.
So running bw.exe login --apikey with the secret and id as environment variables works. Interestingly hard coding the id, secret, and pw also works in tf plan. Passing them as variables seems to be the issue. did some poking and found that removing quotes from variables being passed in seems to fix this! Thank you for help with troubleshooting, would a bit of input sanitization to remove leading/trailing quotes be possible?
from terraform-provider-bitwarden.
Glad you sorted it out!
Sanitization definitely makes sense, and maybe those field have a format we could add to the provider's schema for validation.
from terraform-provider-bitwarden.
Great, thanks again for the assistance.
from terraform-provider-bitwarden.
Related Issues (15)
- [Incident] Cannot access self hosed bitwarden instance because of self-signed certificate HOT 1
- Expired GPG key for provider breaks usage with Terraform 1.6.0+ HOT 5
- [ISSUE] GPG Key expired HOT 2
- Flag passwords as sensitive HOT 5
- [FEATURE] Remove Bitwarden CLI dependency HOT 11
- [Feature request] Support Bitwarden SSO/BW_SESSION environment variable HOT 38
- [Feature request] Ability to support URI on item login resource HOT 2
- Receiving 'Rate limit exceeded' error on high number of api calls HOT 10
- [Feature Request] Add organization collection `data` type and `resource` type HOT 4
- Terraform plan/refresh produces "Not found" errors HOT 2
- apikey: exit status 1, Cannot read properties of null (reading 'profile') HOT 4
- A specific example in the documentation HOT 3
- Using session key when applying from plan produces unauthenticated error HOT 7
- Text fields created by provider are not visible by GUI clients HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-bitwarden.