snowflakewif

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package snowflakewif validates exact Snowflake workload identity claims.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QuoteIdentifier

func QuoteIdentifier(value string) string

QuoteIdentifier treats every input as one exact identifier, never SQL syntax.

func Token

func Token(ctx context.Context, socketPath string, identity Identity) (string, error)

Token obtains and verifies a fresh JWT-SVID through the local attested Workload API. Neither JWTs nor upstream errors containing claims escape as diagnostics.

Types

type Identity

type Identity struct {
	Issuer   string
	Subject  spiffeid.ID
	Audience string
}

Identity contains only the public claims needed to establish Snowflake trust.

func NewIdentity

func NewIdentity(issuerURL string, organization, dataSource slug.Slug, account string) (Identity, error)

NewIdentity validates public claims; it does not authorize token issuance.

type ObjectGrant

type ObjectGrant struct {
	Name      string `json:"name"`
	Privilege string `json:"privilege"`
}

ObjectGrant names an existing table in the selected database and schema.

type Setup

type Setup struct {
	Warehouse string
	Database  string
	Schema    string
	Role      string
	Objects   []ObjectGrant
}

func (Setup) Script

func (s Setup) Script(identity Identity) (string, error)

Script is displayed for customer review only; no Braidplane execution path uses it.

func (Setup) Validate

func (s Setup) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL