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

use builtin header for scoped v4 clients #352

Merged
merged 1 commit into from
Aug 5, 2024
Merged

Conversation

mwilde345
Copy link
Member

@mwilde345 mwilde345 commented Aug 5, 2024

Ticket(s): FE-5698

Problem

  • scoped v4 clients weren't getting the "builtin" header

Solution

  • use the getHeaders() function from the other places we build a v4 client

Result

  • all methods of building a v4 client employ the "x-fauna-shell-builtin" header check
➜  fauna-shell git:(createkey-fix) ✗ node bin/run create-key made_in_v4
Connected to endpoint: devlocal-us
Connected to endpoint: devlocal-us database: made_in_v4
creating key for database 'made_in_v4' with role 'admin'

  created key for database 'made_in_v4' with role 'admin'.
  secret: <redacted>

  To access 'made_in_v4' with this key, create a client using
  the driver library for your language of choice using
  the above secret.

Testing

  • create-key is one command that uses scoped clients. Updated the mockCreateKey method there to expect the builtin header.

Screenshot 2024-08-05 at 1 24 18 PM

@mwilde345 mwilde345 marked this pull request as ready for review August 5, 2024 17:27
@echo-bravo-yahoo echo-bravo-yahoo merged commit 608e3de into main Aug 5, 2024
2 checks passed
@echo-bravo-yahoo echo-bravo-yahoo deleted the createkey-fix branch August 5, 2024 17:53
@mwilde345 mwilde345 mentioned this pull request Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants