Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating docs to indicate correct Authorization Header for Signed URL requests #2

Closed
wants to merge 1 commit into from

Conversation

kellydunn
Copy link
Contributor

While attempting to integrate our backend with Cloudflare Stream, I was consistently receiving the following error when supplying the "X-Auth-Key: ${API-KEY}" header as the docs indicate:

{"success":false,"errors":[{"code":10000,"message":"Authentication error"}]}

However, when supplying the same API_KEY as an Authorization: Bearer ${API_KEY} header, I'm able to get a successful request.

This PR updates the docs to reflect this.

@adamschwartz adamschwartz added the product:stream Related to Stream product label Oct 1, 2020
@renandincer
Copy link
Member

Hey @kellydunn: Cloudflare API has two authentication methods: API Keys and API Tokens.

You either need to specify X-Auth-Email and X-Auth-Key headers where auth key is your global API key, or a Authorization header with a API Token. The reason you might be getting authentication errors could be because you are using an API Token where a Global API Key is expected.

Here's the page where some differences between tokens and keys are documented: https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys

New developers on Cloudflare seem to use API Tokens rather than Keys so I think we should move all examples in the Stream docs to use Tokens.

@renandincer renandincer self-assigned this Oct 7, 2020
@adamschwartz
Copy link
Contributor

@ispivey @renandincer should this be closed?

@kellydunn
Copy link
Contributor Author

New developers on Cloudflare seem to use API Tokens rather than Keys so I think we should move all examples in the Stream docs to use Tokens.

Word, yeah -- we currently enjoy segmenting access to third-party APIs in our SOA/microservice Architecture by creating Service Specific Access Tokens, not just for cloudflare, but for other services as well. I'd imagine folks would definitely want to follow similar patterns if they wanted to separate access on a service by service level.

@renandincer
Copy link
Member

@adamschwartz I'll push up a change making all examples use auth tokens, rather than auth keys to avoid confusion. Please keep this open for a few days until I get to it.

@renandincer
Copy link
Member

Opened #149 to make this change across the entire Stream docs

@adamschwartz
Copy link
Contributor

@renandincer Should we close this then?

@renandincer
Copy link
Member

Yep! Let's discuss on #149!

marciocloudflare added a commit that referenced this pull request Aug 6, 2021
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 23, 2022

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: ad47359
Status: ✅  Deploy successful!
Preview URL: https://f55a0017.cloudflare-docs-7ou.pages.dev

View logs

ranbel pushed a commit that referenced this pull request May 4, 2023
kodster28 added a commit that referenced this pull request Jul 12, 2023
* [TEST] Comments on PRs

* another update
@github-actions
Copy link

Files with changes (up to 15)

Original Link Updated Link

kodster28 added a commit that referenced this pull request Jan 17, 2024
kodster28 added a commit that referenced this pull request Jan 17, 2024
* [Chore] Expand ignore list #2

* Update language
@JoshuaYe JoshuaYe mentioned this pull request Aug 16, 2024
3 tasks
RebeccaTamachiro added a commit that referenced this pull request Nov 22, 2024
* Add placeholders for new folder and pages and fill in frontmatter

* Add outline for index.mdx and fill in TLS background info

* Apply suggestion: Reword intro to TLS building blocks

Co-authored-by: Peter Wu <[email protected]>

* Fix typo and reword index.mdx meta description

* Improve parallelism, refine text, and link out to TLS handshake LC

* Fill in hybrid key agreement section

* Complete visitor-to-cloudflare intro paragraph

* Add mermaid digram for connections and reword #2

* Fix Internet capitalization

Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>

* Rename file, fill in, and link to pqc-support

* Fix capitalization and fill in Intenal connections section

* Fill in Cf to origin and review titles and headings

* Fix missing hyphen and touch up pqc-to-origin description

* Add split ClientHello and HRR workaround to pqc-to-origin

* Add setup instructions to pqc-to-origin

* Apply suggestion from code review

Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Luke Valenta <[email protected]>
Co-authored-by: Suleman Ahmad <[email protected]>

* Replace store by harvest, adjust RFC link cf Style Guide, and split long paragarph

* Add reference to PQ signatures and link out to blog

* Fix origin server section to use fork and bssl for both cases

* Add link to Cloudflare Radar

Co-authored-by: Luke Valenta <[email protected]>

* Text review and move link to Radar higher up in the page

* Simplify origin server instructions to use BoringSSL instead of fork

Co-authored-by: Suleman Ahmad <[email protected]>

* Overall text review and remove previous origin instructions

* Apply suggestion from code review

Co-authored-by: Jun Lee <[email protected]>

---------

Co-authored-by: Peter Wu <[email protected]>
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Co-authored-by: Luke Valenta <[email protected]>
Co-authored-by: Suleman Ahmad <[email protected]>
Co-authored-by: Jun Lee <[email protected]>
harshil1712 pushed a commit that referenced this pull request Dec 3, 2024
* Add placeholders for new folder and pages and fill in frontmatter

* Add outline for index.mdx and fill in TLS background info

* Apply suggestion: Reword intro to TLS building blocks

Co-authored-by: Peter Wu <[email protected]>

* Fix typo and reword index.mdx meta description

* Improve parallelism, refine text, and link out to TLS handshake LC

* Fill in hybrid key agreement section

* Complete visitor-to-cloudflare intro paragraph

* Add mermaid digram for connections and reword #2

* Fix Internet capitalization

Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>

* Rename file, fill in, and link to pqc-support

* Fix capitalization and fill in Intenal connections section

* Fill in Cf to origin and review titles and headings

* Fix missing hyphen and touch up pqc-to-origin description

* Add split ClientHello and HRR workaround to pqc-to-origin

* Add setup instructions to pqc-to-origin

* Apply suggestion from code review

Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Luke Valenta <[email protected]>
Co-authored-by: Suleman Ahmad <[email protected]>

* Replace store by harvest, adjust RFC link cf Style Guide, and split long paragarph

* Add reference to PQ signatures and link out to blog

* Fix origin server section to use fork and bssl for both cases

* Add link to Cloudflare Radar

Co-authored-by: Luke Valenta <[email protected]>

* Text review and move link to Radar higher up in the page

* Simplify origin server instructions to use BoringSSL instead of fork

Co-authored-by: Suleman Ahmad <[email protected]>

* Overall text review and remove previous origin instructions

* Apply suggestion from code review

Co-authored-by: Jun Lee <[email protected]>

---------

Co-authored-by: Peter Wu <[email protected]>
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Co-authored-by: Luke Valenta <[email protected]>
Co-authored-by: Suleman Ahmad <[email protected]>
Co-authored-by: Jun Lee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product:stream Related to Stream product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants