_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c24100
train
// NewImplicitRole is the default implicit role that gets added to all // RoleSets.
{ "resource": "" }
c24101
train
// RoleForUser creates an admin role for a services.User.
{ "resource": "" }
c24102
train
// RoleForCertauthority creates role using services.CertAuthority.
{ "resource": "" }
c24103
train
// ConvertV1CertAuthority converts V1 cert authority for new CA and Role
{ "resource": "" }
c24104
train
// applyValueTraits applies the passed in traits to the variable, // returns BadParameter in case if referenced variable is unsupported, // returns NotFound in case if referenced trait is missing, // mapped list of values otherwise, the function guarantees to return // at least one value in case if return value is nil
{ "resource": "" }
c24105
train
// Equals returns true if the roles are equal. Roles are equal if options, // namespaces, logins, labels, and conditions match.
{ "resource": "" }
c24106
train
// GetLogins gets system logins for allow or deny condition.
{ "resource": "" }
c24107
train
// SetLogins sets system logins for allow or deny condition.
{ "resource": "" }
c24108
train
// GetKubeGroups returns kubernetes groups
{ "resource": "" }
c24109
train
// SetKubeGroups sets kubernetes groups for allow or deny condition.
{ "resource": "" }
c24110
train
// GetNamespaces gets a list of namespaces this role is allowed or denied access to.
{ "resource": "" }
c24111
train
// GetNamespaces sets a list of namespaces this role is allowed or denied access to.
{ "resource": "" }
c24112
train
// GetNodeLabels gets the map of node labels this role is allowed or denied access to.
{ "resource": "" }
c24113
train
// SetNodeLabels sets the map of node labels this role is allowed or denied access to.
{ "resource": "" }
c24114
train
// GetRules gets all allow or deny rules.
{ "resource": "" }
c24115
train
// SetRules sets an allow or deny rule.
{ "resource": "" }
c24116
train
// String returns the human readable representation of a role.
{ "resource": "" }
c24117
train
// NewRule creates a rule based on a resource name and a list of verbs
{ "resource": "" }
c24118
train
// CheckAndSetDefaults checks and sets defaults for this rule
{ "resource": "" }
c24119
train
// score is a sorting score of the rule, the more the score, the more // specific the rule is
{ "resource": "" }
c24120
train
// MatchesWhere returns true if Where rule matches // Empty Where block always matches
{ "resource": "" }
c24121
train
// ProcessActions processes actions specified for this rule
{ "resource": "" }
c24122
train
// HasResource returns true if the rule has the specified resource.
{ "resource": "" }
c24123
train
// HasVerb returns true if the rule has verb, // this method also matches wildcard
{ "resource": "" }
c24124
train
// Equals returns true if the rule equals to another
{ "resource": "" }
c24125
train
// Slice returns slice from a set
{ "resource": "" }
c24126
train
// MakeRuleSet converts slice of rules to the set of rules
{ "resource": "" }
c24127
train
// CopyRulesSlice copies input slice of Rules and returns the copy
{ "resource": "" }
c24128
train
// RuleSlicesEqual returns true if two rule slices are equal
{ "resource": "" }
c24129
train
// Equals test roles for equality. Roles are considered equal if all resources, // logins, namespaces, labels, and options match.
{ "resource": "" }
c24130
train
// SetResource sets resource rule
{ "resource": "" }
c24131
train
// RemoveResource deletes resource entry
{ "resource": "" }
c24132
train
// SetNodeLabels sets node labels for role
{ "resource": "" }
c24133
train
// SetMaxSessionTTL sets a maximum TTL for SSH or Web session
{ "resource": "" }
c24134
train
// FromSpec returns new RoleSet created from spec
{ "resource": "" }
c24135
train
// NewRole constructs new standard role
{ "resource": "" }
c24136
train
// FetchRoles fetches roles by their names, applies the traits to role // variables, and returns the RoleSet.
{ "resource": "" }
c24137
train
// NewRoleSet returns new RoleSet based on the roles
{ "resource": "" }
c24138
train
// MatchNamespace returns true if given list of namespace matches // target namespace, wildcard matches everything.
{ "resource": "" }
c24139
train
// MatchLogin returns true if attempted login matches any of the logins.
{ "resource": "" }
c24140
train
// MatchLabels matches selector against target. Empty selector matches // nothing, wildcard matches everything.
{ "resource": "" }
c24141
train
// RoleNames returns a slice with role names
{ "resource": "" }
c24142
train
// HasRole checks if the role set has the role
{ "resource": "" }
c24143
train
// AdjustSessionTTL will reduce the requested ttl to lowest max allowed TTL // for this role set, otherwise it returns ttl unchanged
{ "resource": "" }
c24144
train
// AdjustClientIdleTimeout adjusts requested idle timeout // to the lowest max allowed timeout, the most restrictive // option will be picked, negative values will be assumed as 0
{ "resource": "" }
c24145
train
// AdjustDisconnectExpiredCert adjusts the value based on the role set // the most restrictive option will be picked
{ "resource": "" }
c24146
train
// CheckKubeGroups check if role can login into kubernetes // and returns a combined list of allowed groups
{ "resource": "" }
c24147
train
// CheckLoginDuration checks if role set can login up to given duration and // returns a combined list of allowed logins.
{ "resource": "" }
c24148
train
// CanForwardAgents returns true if role set allows forwarding agents.
{ "resource": "" }
c24149
train
// CanPortForward returns true if a role in the RoleSet allows port forwarding.
{ "resource": "" }
c24150
train
// CertificateFormat returns the most permissive certificate format in a // RoleSet.
{ "resource": "" }
c24151
train
// CheckAgentForward checks if the role can request to forward the SSH agent // for this user.
{ "resource": "" }
c24152
train
// Clone returns non-shallow copy of the labels set
{ "resource": "" }
c24153
train
// Equals returns true if two label sets are equal
{ "resource": "" }
c24154
train
// MarshalTo marshals value to the slice
{ "resource": "" }
c24155
train
// UnmarshalJSON marshals Duration to string
{ "resource": "" }
c24156
train
// GetRoleSchema returns role schema for the version requested with optionally // injected schema for extensions.
{ "resource": "" }
c24157
train
// UnmarshalRole unmarshals role from JSON, sets defaults, and checks schema.
{ "resource": "" }
c24158
train
// UnmarshalRole unmarshals role from JSON.
{ "resource": "" }
c24159
train
// MarshalRole marshalls role into JSON.
{ "resource": "" }
c24160
train
// Initialize allows ResourceCommand to plug itself into the CLI parser
{ "resource": "" }
c24161
train
// IsDeleteSubcommand returns 'true' if the given command is `tctl rm`
{ "resource": "" }
c24162
train
// Get prints one or many resources of a certain type
{ "resource": "" }
c24163
train
// Create updates or insterts one or many resources
{ "resource": "" }
c24164
train
// createTrustedCluster implements `tctl create cluster.yaml` command
{ "resource": "" }
c24165
train
// createCertAuthority creates certificate authority
{ "resource": "" }
c24166
train
// createUser implements 'tctl create user.yaml' command
{ "resource": "" }
c24167
train
// Delete deletes resource by name
{ "resource": "" }
c24168
train
// NewHostCertificateCache creates a shared host certificate cache that is // used by the forwarding server.
{ "resource": "" }
c24169
train
// GetHostCertificate will fetch a certificate from the cache. If the certificate // is not in the cache, it will be generated, put in the cache, and returned. Mul // Multiple callers can arrive and generate a host certificate at the same time. // This is a tradeoff to prevent long delays here due to the expensive // c...
{ "resource": "" }
c24170
train
// get is goroutine safe and will return a ssh.Signer for a principal from // the cache.
{ "resource": "" }
c24171
train
// set is goroutine safe and will set a ssh.Signer for a principal in // the cache.
{ "resource": "" }
c24172
train
// generateHostCert will generate a SSH host certificate for a given // principal.
{ "resource": "" }
c24173
train
// NewMonitor returns a new monitor
{ "resource": "" }
c24174
train
// OnStart is the handler for "start" CLI command
{ "resource": "" }
c24175
train
// onStatus is the handler for "status" CLI command
{ "resource": "" }
c24176
train
// CopyByteSlice returns a copy of the byte slice.
{ "resource": "" }
c24177
train
// CopyByteSlices returns a copy of the byte slices.
{ "resource": "" }
c24178
train
// JoinStringSlices joins two string slices and returns a resulting slice
{ "resource": "" }
c24179
train
// CopyStrings makes a deep copy of the passed in string slice and returns // the copy.
{ "resource": "" }
c24180
train
// ReplaceInSlice replaces element old with new and returns a new slice.
{ "resource": "" }
c24181
train
// reconnectToAuthService continuously attempts to reconnect to the auth // service until succeeds or process gets shut down
{ "resource": "" }
c24182
train
// connectToAuthService attempts to login into the auth servers specified in the // configuration and receive credentials.
{ "resource": "" }
c24183
train
// newWatcher returns a new watcher, // either using local auth server connection or remote client
{ "resource": "" }
c24184
train
// getCertAuthority returns cert authority by ID. // In case if auth servers, the role is 'TeleportAdmin' and instead of using // TLS client this method uses the local auth server.
{ "resource": "" }
c24185
train
// reRegister receives new identity credentials for proxy, node and auth. // In case if auth servers, the role is 'TeleportAdmin' and instead of using // TLS client this method uses the local auth server.
{ "resource": "" }
c24186
train
// periodicSyncRotationState checks rotation state periodically and // takes action if necessary
{ "resource": "" }
c24187
train
// syncRotationStateAndBroadcast syncs rotation state and broadcasts events // when phase has been changed or reload happened
{ "resource": "" }
c24188
train
// syncRotationState compares cluster rotation state with the state of // internal services and performs the rotation if necessary.
{ "resource": "" }
c24189
train
// newClient attempts to connect directly to the Auth Server. If it fails, it // falls back to trying to connect to the Auth Server through the proxy.
{ "resource": "" }
c24190
train
// findReverseTunnel uses the web proxy to discover where the SSH reverse tunnel // server is running.
{ "resource": "" }
c24191
train
// CalculateSPKI the hash value of the SPKI header in a certificate.
{ "resource": "" }
c24192
train
// CheckSPKI the passed in pin against the calculated value from a certificate.
{ "resource": "" }
c24193
train
// MakeHandler returns a new httprouter.Handle func from a handler func
{ "resource": "" }
c24194
train
// MakeStdHandler returns a new http.Handle func from http.HandlerFunc
{ "resource": "" }
c24195
train
// WithCSRFProtection ensures that request to unauthenticated API is checked against CSRF attacks
{ "resource": "" }
c24196
train
// ConvertResponse converts http error to internal error type // based on HTTP response code and HTTP body contents
{ "resource": "" }
c24197
train
// ParseBool will parse boolean variable from url query // returns value, ok, error
{ "resource": "" }
c24198
train
// Rewrite creates a rewrite pair, panics if in epxression // is not a valid regular expressoin
{ "resource": "" }
c24199
train
// RewritePaths creates a middleware that rewrites paths in incoming request
{ "resource": "" }