Skip to content

implement Secret core API #3178

Closed
Closed

Description

@vito

We need to implement the new Secret type in order to finish implementing Directory and File:

extend type Query {
"Load a secret from its ID"
secret(id: SecretID!): Secret
}
"A unique identifier for a secret"
scalar SecretID
"A reference to a secret value, which can be handled more safely than the value itself"
type Secret {
"The identifier for this secret"
id: SecretID!
}

See core/file.go for reference.

Once Secret exists, use it to implement file { secret }:

dagger/core/file.go

Lines 151 to 155 in 03ea15e

"File": router.ObjectResolver{
"contents": router.ToResolver(s.contents),
"secret": router.ErrResolver(ErrNotImplementedYet),
"size": router.ToResolver(s.size),
},

Disclaimer: I'm writing this issue without having used Secrets in Dagger before. I think SecretID is just a simple string rather than a JSON->base64'd value.

Activity

  1. assigned and unassigned on Oct 3, 2022
  2. dolanor commented on Oct 3, 2022

    @dolanor
    Contributor

    Pulling out as it is harder with still unanswered design.
    Working on the HTTP impl instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions