Skip to content

Commit

Permalink
quicksave
Browse files Browse the repository at this point in the history
  • Loading branch information
marcely0 committed Oct 22, 2022
1 parent 3a32df9 commit 198e652
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
9 changes: 9 additions & 0 deletions api/http/handler/portainercc/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ type KeyParams struct {
Data string
}

type UpdateKeyParams struct {
TeamAccessPolicies portainer.TeamAccessPolicies
}

type ExportKey struct {
Id int
PEM string
}

func (handler *Handler) generateOrImport(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
var params KeyParams
err := json.NewDecoder(r.Body).Decode(&params)
Expand Down
25 changes: 25 additions & 0 deletions api/portainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package portainer

import (
"context"
"crypto/rsa"
"io"
"time"

Expand All @@ -13,6 +14,30 @@ import (
)

type (

// portainerCC

KeyID int

Key struct {
ID KeyID `json:"Id"`
KeyType string `json:"KeyType"`
Description string `json:"Description"`
PFKey string `json:"PFKey,omitempty"`
SigningKey *rsa.PrivateKey `json:"SigningKey,omitempty"`
TeamAccessPolicies TeamAccessPolicies `json:"TeamAccessPolicies"`
}

SignedImageID int

SignedImage struct {
ID SignedImageID `json:"Id"`
Timestamp time.Time `json:"CreatedAt"`
ImageId string `json:"ImageId"`
MRSIGNER string `json:"MRSIGNER"`
MRENCLAVE string `json:"MRENCLAVE"`
}

// AccessPolicy represent a policy that can be associated to a user or team
AccessPolicy struct {
// Role identifier. Reference the role that will be associated to this access policy
Expand Down
2 changes: 1 addition & 1 deletion gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function shell_run_container() {
-v /var/run/docker.sock:/var/run/alternative.sock:z \
-v /tmp:/tmp \
--name portainer \
portainer/base \
notifierman/gramine-os:latest \
/app/portainer ${portainerFlags}
`;
}
Expand Down

0 comments on commit 198e652

Please sign in to comment.