Closed divergentdave closed 1 year ago
Just confirming, the -u url is the api url? And curling that reaches the api correctly?
This wouldn't surprise me if it wasn't in fact receiving json, but instead is receiving html because it's hitting the react app
Whoops, you were right, I should have been using -u http://api.example/
.
New problem: I now get unexpected http status GET http://api.example/api/accounts Some(403):
in red text.
Sounds like the api token isn't found
Since I'm currently using the integration test flavor of the container image, I think that's interfering with the token-based authentication. I confirmed the API token matches. If I replay the request in curl, and then tweak it by removing the Authorization header entirely, then it succeeds. To make acceptance testing easier, we could either tweak how the integration test feature works to coexist with this header, add a way to use the CLI without a token, or change our deployment to use prod-ready images and an Auth0 mock or dev tenant. I'm going to close this issue, since it stemmed from user error.
I was stepping through the new account creation flow on commit 281ea361c3c17c4ddca51c62c9fe58f42e249895, and I ran into an error when generating collector credentials. I ran
RUST_LOG=trace cargo run -p divviup-cli -- -u http://app.example/ -t DUAT... hpke-config generate
. The logs indicate that that it made aGET /api/accounts
request, and got a 200 response. Following this, it printed the error messageexpected value at line 1 column 1
in red. (not via tracing-subscriber)