Skip to content

Commit 1eb9062

Browse files
committed
Merge remote-tracking branch 'origin/make-dpop-optional' into make-dpop-optional
2 parents 661fcc7 + 65f116a commit 1eb9062

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM cgr.dev/chainguard/go:latest AS builder
1+
FROM cgr.dev/chainguard/go:latest AS builder
22
ARG TARGETOS TARGETARCH
33

44
WORKDIR /app

sdk/README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,34 @@
33
A Go implementation of the OpenTDF protocol, and access library for services
44
included in the Data Security Platform.
55

6+
Note: if you are consuming the SDK as a submodule you may need to add replace directives as follows:
7+
8+
```go
9+
replace (
10+
github.com/opentdf/platform/service => ./opentdf/service
11+
github.com/opentdf/platform/lib/fixtures => ./opentdf/lib/fixtures
12+
github.com/opentdf/platform/protocol/go => ./opentdf/protocol/go
13+
github.com/opentdf/platform/lib/ocrypto => ./opentdf/lib/ocrypto
14+
github.com/opentdf/platform/sdk => ./opentdf/sdk
15+
github.com/opentdf/platform/service => ./opentdf/service
16+
)
17+
```
18+
619
## Quick Start of the Go SDK
720

821
```go
922
package main
1023

11-
import bytes
12-
import io
13-
import os
14-
import strings
24+
import "fmt"
25+
import "bytes"
26+
import "io"
27+
import "os"
28+
import "strings"
1529
import "github.com/opentdf/platform/sdk"
1630

1731

1832
func main() {
19-
s := sdk.New(
33+
s, _ := sdk.New(
2034
sdk.WithAuth(mtls.NewGRPCAuthorizer(creds) /* or OIDC or whatever */),
2135
sdk.WithDataSecurityConfig(/* attribute schemas, kas multi-attribute mapping */),
2236
)

service/internal/auth/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type Config struct {
1010

1111
// AuthNConfig is the configuration need for the platform to validate tokens
1212
type AuthNConfig struct {
13-
AllowNoDPoP bool `yaml:"allowNoDPoP" json:"allowNoDPoP" default:"true"`
13+
AllowNoDPoP bool `yaml:"allowNoDPoP" json:"allowNoDPoP"`
1414
Issuer string `yaml:"issuer" json:"issuer"`
1515
Audience string `yaml:"audience" json:"audience"`
1616
OIDCConfiguration `yaml:"-" json:"-"`

service/pkg/server/start_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,5 @@ func Test_Start_When_Extra_Service_Registered_Expect_Response(t *testing.T) {
132132
respBody, err := io.ReadAll(resp.Body)
133133

134134
require.NoError(t, err)
135-
// FIXME: either by adding paths that do not require authentication or by writing our own auth token
136135
assert.Equal(t, "hello from test service!", string(respBody))
137136
}

0 commit comments

Comments
 (0)