Comments (13)
Awesome, I'm glad you were able to track it down!
from cli.
Hi @seagullmouse, sorry that you're running into an issue here!
Can you share the output of doing an unauthenticated curl against our API? I'm suspecting a networking issue.
curl -v 'https://api.doppler.com/v3/projects'
from cli.
~/Documents/code/rise/rise-pol main curl -v 'https://api.doppler.com/v3/projects'
* Trying 172.66.40.54:443...
* Connected to api.doppler.com (172.66.40.54) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Cloudflare, Inc.; CN=doppler.com
* start date: Nov 24 00:00:00 2022 GMT
* expire date: Feb 21 23:59:59 2023 GMT
* subjectAltName: host "api.doppler.com" matched cert's "*.doppler.com"
* issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3
* SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x148811000)
> GET /v3/projects HTTP/2
> Host: api.doppler.com
> user-agent: curl/7.79.1
> accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 401
< date: Fri, 20 Jan 2023 15:50:07 GMT
< content-type: application/json; charset=utf-8
< content-length: 131
< cf-ray: 78c8f6cafa0676f6-LHR
< etag: W/"83-wz0cc/Q3w4uW/SNOdV478Au1wJc"
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< via: 1.1 google
< cf-cache-status: DYNAMIC
< alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
< content-security-policy: default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests
< cross-origin-opener-policy: same-origin
< referrer-policy: strict-origin
< x-content-type-options: nosniff
< x-dns-prefetch-control: off
< x-download-options: noopen
< x-frame-options: SAMEORIGIN
< x-permitted-cross-domain-policies: none
< x-request-id: e03c2b52-c20f-4fb6-8bf5-6597172dc7b2
< x-xss-protection: 0
< server: cloudflare
<
* Connection #0 to host api.doppler.com left intact
{"messages":["Please provide an api key. You can learn more at https://docs.doppler.com/reference#authentication"],"success":false}% ~/Documents/code/rise/rise-pol main
from cli.
OK, that request is looking solid to me. Can you try a POST?
curl -X POST https://api.doppler.com/v3/auth/cli/authorize -H 'Content-Type: application/json' --data '{"code": "test"}'
from cli.
{"messages":["Invalid auth code"],"success":false}%
from cli.
Does the login perform some frequent polling of the API? I wonder if my work has some policy on network traffic and thinks this is a threat.
from cli.
It does indeed -- the CLI makes that /v3/auth/cli/authorize
request every 2 seconds to see if the auth code has been registered via the Doppler dashboard. If you retry the doppler login --debug
command after not having run it for awhile, do you see fewer failures? I noticed that our analytics POST is also failing in your original logs.
You could also try running that curl every 2 seconds and see if it starts failing. That would be a pretty telling piece of evidence.
from cli.
Couple of observations
- I tried running it every couple of seconds and can't get it to fail.
- Sometimes the cli returns with a failure within 2 seconds (feels pretty immediate)
from cli.
Is there a workaround to get a token onto my machine?
from cli.
Interesting. One workaround would be to configure your CLI to use a Doppler personal token for authentication. Click on the "Tokens" link in the left menu and select the "Personal" tab. You can only have one personal token at a time so you'll need to roll your existing personal token if you already have one.
Once you've copied the token secret, you can load it into the CLI with pbpaste | doppler configure set token
.
from cli.
Thanks.
I've tried with the personal token but still run into issues with the CLI.
E.g.
doppler configs
Unable to fetch configs
Doppler Error: Get "https://api.doppler.com/v3/configs?per_page=100&project=": EOF
doppler secrets -p **** -c local get DOPPLER_CONFIG --plain
Unable to fetch secrets
Doppler Error: Get "https://api.doppler.com/v3/configs/config/secrets?config=local&include_dynamic_secrets=false&project=****&secrets=DOPPLER_CONFIG": EOF
Something is more fundamentally wrong here.
from cli.
Darn. And I'm guessing that this works for you?
curl -H "Authorization: Bearer $(doppler configure get token --plain)" 'https://api.doppler.com/v3/configs?project=YOUR_PROJECT_NAME'
from cli.
I've finally found a related issue at my company. They have a network filter installed that is buggy.
Thanks for your help on this!
from cli.
Related Issues (20)
- [BUG] Cannot CTRL-C ray serve when running with doppler HOT 1
- [BUG] v3.57.0 now require project and config arguments HOT 3
- [BUG] Doppler setup isn't working. HOT 2
- [BUG] install specific version of the Doppler CLI HOT 4
- [BUG] `doppler run` Fails to Mount Ephemeral Secret File on Mac HOT 3
- [BUG] Race condition in `doppler setup` when applying settings in more than one project HOT 1
- [FEATURE] Service accounts HOT 5
- [FEATURE] Grant members access through CLI HOT 1
- [FEATURE] Allow user to disable or silence `valueFromEnvironmentNotice` warnings HOT 8
- [FEATURE] Allow specifying repo config file from CLI HOT 4
- [BUG] Cannot run executable found relative to current directory
- [BUG] doppler logout does not invalidate token HOT 1
- [BUG] doppler (no such package) HOT 1
- [FEATURE] Configure doppler repo-wide to stop asking to update itself HOT 7
- [FEATURE] idea: stale-while-revalidate for secrets
- [BUG] `doppler tui` loads no data and crashes on Tab press HOT 1
- [FEATURE] One login for multiple letter drive
- [FEATURE] Fine grained access control - agroup can be a reader for one config & contributor for another config HOT 1
- dopplerhq/cli-action@v2 throws spawnSync /bin/sh ETIMEDOUT error HOT 1
- [FEATURE] Support webhook management through cli HOT 1
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 cli.