Skip to content

add Secret Store implementation#19

Merged
joeshaw merged 4 commits into
mainfrom
joeshaw/secret-store-sdk
Jan 20, 2023
Merged

add Secret Store implementation#19
joeshaw merged 4 commits into
mainfrom
joeshaw/secret-store-sdk

Conversation

@joeshaw
Copy link
Copy Markdown
Member

@joeshaw joeshaw commented Nov 30, 2022

This adds hostcall and SDK support for the Fastly Secret Store. An
example is included for usage but the basic idea is:

st, err := secretstore.Open("example_secretstore")
if err != nil {
    panic(err)
}

s, err := st.Get("my_secret")
if err != nil {
    panic(err)
}

pt, err := s.Plaintext()
if err != nil {
    panic(err)
}

fmt.Fprintf(w, "secret value: %q", v)

@joeshaw
Copy link
Copy Markdown
Member Author

joeshaw commented Nov 30, 2022

Still to do: Viceroy doesn't have support for these hostcalls yet, so the example is expected to fail on it. Looks like we need an integration test for it as well (which I would expect to fail for now).

Comment thread _examples/secret/main.go Outdated
@joeshaw
Copy link
Copy Markdown
Member Author

joeshaw commented Dec 1, 2022

Viceroy PR: fastly/Viceroy#210

@joeshaw joeshaw added the blocked label Dec 5, 2022
@joeshaw joeshaw force-pushed the joeshaw/secret-store-sdk branch 2 times, most recently from 3c058bd to 2c4b7cf Compare January 20, 2023 19:36
@joeshaw joeshaw removed the blocked label Jan 20, 2023
@joeshaw joeshaw force-pushed the joeshaw/secret-store-sdk branch 2 times, most recently from 00ac085 to 9ddfe44 Compare January 20, 2023 20:04
@joeshaw joeshaw marked this pull request as ready for review January 20, 2023 20:26
This adds hostcall and SDK support for the Fastly Secret Store.  An
example is included for usage but the basic idea is:

```go
st, err := secretstore.Open("example_secretstore")
if err != nil {
    panic(err)
}

s, err := st.Get("my_secret")
if err != nil {
    panic(err)
}

pt, err := s.Plaintext()
if err != nil {
    panic(err)
}

fmt.Fprintf(w, "secret value: %q", v)
```
@joeshaw joeshaw force-pushed the joeshaw/secret-store-sdk branch from 9ddfe44 to ee90fe3 Compare January 20, 2023 20:48
Copy link
Copy Markdown
Member

@dgryski dgryski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joeshaw joeshaw merged commit 03174b6 into main Jan 20, 2023
@joeshaw joeshaw deleted the joeshaw/secret-store-sdk branch January 20, 2023 20:58
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.

3 participants