Skip to content

use builtin header for scoped v4 clients#352

Merged
echo-bravo-yahoo merged 1 commit intomainfrom
createkey-fix
Aug 5, 2024
Merged

use builtin header for scoped v4 clients#352
echo-bravo-yahoo merged 1 commit intomainfrom
createkey-fix

Conversation

@wildemat
Copy link
Contributor

@wildemat wildemat 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

@wildemat wildemat 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
@echo-bravo-yahoo echo-bravo-yahoo deleted the createkey-fix branch August 5, 2024 17:53
@wildemat wildemat 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