Documentation ¶
Overview ¶
Package premain contains the logic invoked before the applications actual main-function, that authenticates to the coordinator and pulls configurations and secrets which are subsequently passed to the application.
Index ¶
- func ActivateRPCNoTTLS(req *rpc.ActivationReq, coordAddr string, ...) (*rpc.Parameters, error)
- func GramineActivate(req *rpc.ActivationReq, coordAddr string, ...) (*rpc.Parameters, error)
- func PreMain() error
- func PreMainEgo() error
- func PreMainEx(issuer quote.Issuer, activate ActivateFunc, hostfs, enclavefs afero.Fs) error
- func PreMainMock() error
- type ActivateFunc
- type GramineQuoteIssuer
- type OcclumQuoteIssuer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateRPCNoTTLS ¶ added in v1.4.1
func ActivateRPCNoTTLS(req *rpc.ActivationReq, coordAddr string, tlsCredentials credentials.TransportCredentials) (*rpc.Parameters, error)
ActivateRPCNoTTLS sends an activation request to the Coordinator. It fails if TTLS is configured.
func GramineActivate ¶ added in v0.5.1
func GramineActivate(req *rpc.ActivationReq, coordAddr string, tlsCredentials credentials.TransportCredentials) (*rpc.Parameters, error)
GramineActivate sends an activation request to the Coordinator and initializes protected files.
func PreMain ¶
func PreMain() error
PreMain runs before the App's actual main routine and authenticates with the Coordinator.
It obtains a quote from the CPU and authenticates itself to the Coordinator through remote attestation. After successful authentication PreMain will set the files, environment variables and commandline arguments according to the manifest. Finally it will mount the host file system under '/edg/hostfs' before returning execution to the actual application.
func PreMainEgo ¶ added in v0.3.2
func PreMainEgo() error
PreMainEgo works similar to PreMain, but let's EGo's premain handle the in-enclave memory filesystem mounting.
func PreMainEx ¶ added in v0.3.0
PreMainEx is like PreMain, but allows to customize the quoting and file system handling.
func PreMainMock ¶
func PreMainMock() error
PreMainMock mocks the quoting and file system handling in the PreMain routine for testing.
Types ¶
type ActivateFunc ¶ added in v0.3.0
type ActivateFunc func(req *rpc.ActivationReq, coordAddr string, tlsCredentials credentials.TransportCredentials) (*rpc.Parameters, error)
ActivateFunc is called by premain to activate the Marble and get its parameters.
type GramineQuoteIssuer ¶ added in v0.5.1
type GramineQuoteIssuer struct{}
GramineQuoteIssuer issues quotes.
type OcclumQuoteIssuer ¶ added in v0.3.2
type OcclumQuoteIssuer struct{}
OcclumQuoteIssuer issues quotes.