Documentation
¶
Index ¶
Constants ¶
View Source
const AuthorizedGrantsHeader = "X-SSH-Key-Grants"
AuthorizedGrantsHeader carries team/user grants derived from a verified SSH key. The header is only sent on the internal ssh-gateway to regional-gateway route.
Variables ¶
This section is empty.
Functions ¶
func EncodeAuthorizedGrants ¶ added in v0.3.0
func EncodeAuthorizedGrants(grants []AuthorizedGrant) string
EncodeAuthorizedGrants formats SSH key grants for an internal HTTP header.
func UserIDForTeam ¶ added in v0.3.0
func UserIDForTeam(grants []AuthorizedGrant, teamID string) (string, bool)
UserIDForTeam returns the user authorized for teamID by the SSH key grants.
Types ¶
type AuthorizedGrant ¶ added in v0.3.0
AuthorizedGrant identifies one team/user pair authorized by an SSH key.
func ParseAuthorizedGrants ¶ added in v0.3.0
func ParseAuthorizedGrants(raw string) []AuthorizedGrant
ParseAuthorizedGrants parses SSH key grants from an internal HTTP header.
type ConnectionInfo ¶
type ConnectionInfo struct {
Host string `json:"host"`
Port int `json:"port"`
Username string `json:"username"`
}
ConnectionInfo describes how a user can reach a sandbox over SSH.
func BuildConnectionInfo ¶
func BuildConnectionInfo(host string, port int, sandboxID string) *ConnectionInfo
BuildConnectionInfo returns a user-facing SSH connection payload when the region-scoped SSH endpoint is configured.
Click to show internal directories.
Click to hide internal directories.