Skip to content

Commit

Permalink
Nits
Browse files Browse the repository at this point in the history
Signed-off-by: Maia Iyer <[email protected]>
  • Loading branch information
maia-iyer committed Oct 10, 2024
1 parent f090385 commit 573e583
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 41 deletions.
2 changes: 1 addition & 1 deletion api/agent/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (s *Server) GetRouter() http.Handler {
apiRtr.HandleFunc("/api/v1/spire/entries", s.entryDelete).Methods(http.MethodDelete)

// SPIRE server bundles
apiRtr.HandleFunc("/api/v1/spire/bundle", s.bundleGet).Methods(http.MethodGet, http.MethodOptions)
apiRtr.HandleFunc("/api/v1/spire/bundle", s.bundleGet).Methods(http.MethodGet, http.MethodOptions)
apiRtr.HandleFunc("/api/v1/spire/federations/bundles", s.federatedBundleList).Methods(http.MethodGet, http.MethodOptions)
apiRtr.HandleFunc("/api/v1/spire/federations/bundles", s.federatedBundleCreate).Methods(http.MethodPost)
apiRtr.HandleFunc("/api/v1/spire/federations/bundles", s.federatedBundleUpdate).Methods(http.MethodPatch)
Expand Down
72 changes: 32 additions & 40 deletions docs/tornjak-ui-api-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ Below are UI pages of Tornjak with their respective paths. For details on a spec

### - [Healthcheck](https://pkg.go.dev/google.golang.org/grpc/health/grpc_health_v1#HealthCheckRequest)

#### GET
#### /api/v1/spire/healthcheck

##### /api/v1/spire/healthcheck
##### GET

```
Request
Expand All @@ -69,9 +69,9 @@ Content-Type: application/json; charset=utf-8

### - [DebugServer](https://github.com/spiffe/spire-api-sdk/tree/main/proto/spire/api/server/debug/v1)

#### GET
#### /api/v1/spire/serverinfo

##### /api/v1/spire/serverinfo
##### GET

```
Request
Expand Down Expand Up @@ -106,9 +106,9 @@ Content-Type: application/json; charset=utf-8

### - [Agents](https://github.com/spiffe/spire-api-sdk/tree/main/proto/spire/api/server/agent/v1)

#### GET
#### /api/v1/spire/agents

##### /api/v1/spire/agents
##### GET

```
Request
Expand Down Expand Up @@ -142,9 +142,9 @@ Content-Type: application/json; charset=utf-8
}
```

#### POST
##### POST

##### /api/v1/spire/agents/ban
###### /api/v1/spire/agents/ban

```
Request
Expand All @@ -163,57 +163,53 @@ Example response:
SUCCESS
```

#### DELETE

##### /api/v1/spire/agents
###### /api/v1/spire/agents/jointoken

```
Request
api/v1/spire/agents
api/v1/spire/agents/jointoken
Example request payload:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": {
"path": "/spire/agent/",
"trust_domain": "example.org"
}
"path": "/sample/spiffe/id",
"token": "1111",
"trust_domain": "example.org",
"ttl": "500",
}
Example response:
SUCCESS
```
{
"value": "1111",
"expires_at": "555",
}
#### POST
```

##### /api/v1/spire/agents/jointoken
##### DELETE

```
Request
api/v1/spire/agents/jointoken
api/v1/spire/agents
Example request payload:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"path": "/sample/spiffe/id",
"token": "1111",
"trust_domain": "example.org",
"ttl": "500",
"id": {
"path": "/spire/agent/",
"trust_domain": "example.org"
}
}
Example response:
{
"value": "1111",
"expires_at": "555",
}
SUCCESS
```

### - [Entries](https://github.com/spiffe/spire-api-sdk/tree/main/proto/spire/api/server/entry/v1)

#### GET
#### /api/v1/spire/entries

##### /api/v1/spire/entries
##### GET

```
Request
Expand Down Expand Up @@ -248,9 +244,7 @@ Content-Type: application/json; charset=utf-8
}
```

#### POST

##### /api/v1/spire/entries
##### POST

```
Request
Expand Down Expand Up @@ -315,9 +309,7 @@ Example response:
}
```

#### DELETE

##### /api/v1/spire/entries
##### DELETE

```
Request
Expand Down Expand Up @@ -345,9 +337,9 @@ Example response:

### - Tornjak Specific

#### GET
#### /api/v1/tornjak/serverinfo

##### /api/v1/tornjak/serverinfo
##### GET

```
Request
Expand Down

0 comments on commit 573e583

Please sign in to comment.