_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c23300 | train | // readTrustedClusters parses the content of "trusted_clusters" YAML structure
// and modifies Teleport 'conf' by adding "authorities" and "reverse tunnels"
// to it | {
"resource": ""
} | ||
c23301 | train | // applyString takes 'src' and overwrites target with it, unless 'src' is empty
// returns 'True' if 'src' was not empty | {
"resource": ""
} | ||
c23302 | train | // applyListenIP replaces all 'listen addr' settings for all services with
// a given IP | {
"resource": ""
} | ||
c23303 | train | // replaceHost takes utils.NetAddr and replaces the hostname in it, preserving
// the original port | {
"resource": ""
} | ||
c23304 | train | // MarshalJSON marshals Duration to string | {
"resource": ""
} | ||
c23305 | train | // initializeTOTP creates TOTP algorithm and returns the key and QR code. | {
"resource": ""
} | ||
c23306 | train | // rotateAndFetchSignupToken rotates the signup token everytime it's fetched.
// This ensures that an attacker that gains the signup link can not view it,
// extract the OTP key from the QR code, then allow the user to signup with
// the same OTP token. | {
"resource": ""
} | ||
c23307 | train | // CreateUserWithOTP creates account with provided token and password.
// Account username and hotp generator are taken from token data.
// Deletes token after account creation. | {
"resource": ""
} | ||
c23308 | train | // CreateUserWithoutOTP creates an account with the provided password and deletes the token afterwards. | {
"resource": ""
} | ||
c23309 | train | // NewStaticTokens is a convenience wrapper to create a StaticTokens resource. | {
"resource": ""
} | ||
c23310 | train | // GetStaticTokensSchema returns the schema with optionally injected
// schema for extensions. | {
"resource": ""
} | ||
c23311 | train | // Unmarshal unmarshals StaticTokens from JSON. | {
"resource": ""
} | ||
c23312 | train | // Marshal marshals StaticTokens to JSON. | {
"resource": ""
} | ||
c23313 | train | // DeleteAllCertAuthorities deletes all certificate authorities of a certain type | {
"resource": ""
} | ||
c23314 | train | // CreateCertAuthority updates or inserts a new certificate authority | {
"resource": ""
} | ||
c23315 | train | // UpsertCertAuthority updates or inserts a new certificate authority | {
"resource": ""
} | ||
c23316 | train | // CompareAndSwapCertAuthority updates the cert authority value
// if the existing value matches existing parameter, returns nil if succeeds,
// trace.CompareFailed otherwise. | {
"resource": ""
} | ||
c23317 | train | // DeleteCertAuthority deletes particular certificate authority | {
"resource": ""
} | ||
c23318 | train | // ActivateCertAuthority moves a CertAuthority from the deactivated list to
// the normal list. | {
"resource": ""
} | ||
c23319 | train | // DeactivateCertAuthority moves a CertAuthority from the normal list to
// the deactivated list. | {
"resource": ""
} | ||
c23320 | train | // newSession creates a new Teleport session with the given remote node
// if 'joinSessin' is given, the session will join the existing session
// of another user | {
"resource": ""
} | ||
c23321 | train | // interactiveSession creates an interactive session on the remote node, executes
// the given callback on it, and waits for the session to end | {
"resource": ""
} | ||
c23322 | train | // runShell executes user's shell on the remote node under an interactive session | {
"resource": ""
} | ||
c23323 | train | // watchSignals register UNIX signal handlers and properly terminates a remote shell session
// must be called as a goroutine right after a remote shell is created | {
"resource": ""
} | ||
c23324 | train | // CheckAndSetDefaults verifies configuration and sets defaults | {
"resource": ""
} | ||
c23325 | train | // New returns a new instance of multiplexer | {
"resource": ""
} | ||
c23326 | train | // Serve is a blocking function that serves on the listening socket
// and accepts requests. Every request is served in a separate goroutine | {
"resource": ""
} | ||
c23327 | train | // SendKeepAlives allows node to send a stream of keep alive requests | {
"resource": ""
} | ||
c23328 | train | // WatchEvents returns a new stream of cluster events | {
"resource": ""
} | ||
c23329 | train | // UpsertNode upserts node | {
"resource": ""
} | ||
c23330 | train | // authenticate extracts authentication context and returns initialized auth server | {
"resource": ""
} | ||
c23331 | train | // NewGRPCServer returns a new instance of GRPC server | {
"resource": ""
} | ||
c23332 | train | // ServeHTTP dispatches requests based on the request type | {
"resource": ""
} | ||
c23333 | train | // Start serves a request for "proxysites" custom SSH subsystem. It builds an array of
// service.Site structures, and writes it serialized as JSON back to the SSH client | {
"resource": ""
} | ||
c23334 | train | // Closer releases connections and resources associated with logs if any | {
"resource": ""
} | ||
c23335 | train | // FindServersByLabels returns list of the nodes which have labels exactly matching
// the given label set.
//
// A server is matched when ALL labels match.
// If no labels are passed, ALL nodes are returned. | {
"resource": ""
} | ||
c23336 | train | // CurrentClusterAccessPoint returns cluster access point to the currently
// selected cluster and is used for discovery
// and could be cached based on the access policy | {
"resource": ""
} | ||
c23337 | train | // ClusterAccessPoint returns cluster access point used for discovery
// and could be cached based on the access policy | {
"resource": ""
} | ||
c23338 | train | // ConnectToCurrentCluster connects to the auth server of the currently selected
// cluster via proxy. It returns connected and authenticated auth server client
//
// if 'quiet' is set to true, no errors will be printed to stdout, otherwise
// any connection errors are visible to a user. | {
"resource": ""
} | ||
c23339 | train | // ConnectToCluster connects to the auth server of the given cluster via proxy.
// It returns connected and authenticated auth server client
//
// if 'quiet' is set to true, no errors will be printed to stdout, otherwise
// any connection errors are visible to a user. | {
"resource": ""
} | ||
c23340 | train | // addCloser adds any closer in ctx that will be called
// whenever server closes session channel | {
"resource": ""
} | ||
c23341 | train | // nodeName removes the port number from the hostname, if present | {
"resource": ""
} | ||
c23342 | train | // isRecordingProxy returns true if the proxy is in recording mode. Note, this
// function can only be called after authentication has occurred and should be
// called before the first session is created. | {
"resource": ""
} | ||
c23343 | train | // dialAuthServer returns auth server connection forwarded via proxy | {
"resource": ""
} | ||
c23344 | train | // newClientConn is a wrapper around ssh.NewClientConn | {
"resource": ""
} | ||
c23345 | train | // listenAndForward listens on a given socket and forwards all incoming
// commands to the remote address through the SSH tunnel. | {
"resource": ""
} | ||
c23346 | train | // dynamicListenAndForward listens for connections, performs a SOCKS5
// handshake, and then proxies the connection to the requested address. | {
"resource": ""
} | ||
c23347 | train | // currentCluster returns the connection to the API of the current cluster | {
"resource": ""
} | ||
c23348 | train | // CreateDownloadCommand configures and returns a command used
// to download a file | {
"resource": ""
} | ||
c23349 | train | // CreateCommand creates and returns a new Command | {
"resource": ""
} | ||
c23350 | train | // sendError gets called during all errors during SCP transmission.
// It writes it back to the SCP client | {
"resource": ""
} | ||
c23351 | train | // read is used to "ask" for response messages after each SCP transmission
// it only reads text data until a newline and returns 'nil' for "OK" responses
// and errors for everything else | {
"resource": ""
} | ||
c23352 | train | // AddKey adds a new key to the session store. If a key for the host is already
// stored, overwrites it. | {
"resource": ""
} | ||
c23353 | train | // DeleteKey deletes a key from the local store | {
"resource": ""
} | ||
c23354 | train | // DeleteKeys removes all session keys from disk. | {
"resource": ""
} | ||
c23355 | train | // GetKey returns a key for a given host. If the key is not found,
// returns trace.NotFound error. | {
"resource": ""
} | ||
c23356 | train | // SaveCerts saves trusted TLS certificates of certificate authorities | {
"resource": ""
} | ||
c23357 | train | // GetCertsPEM returns trusted TLS certificates of certificate authorities PEM block | {
"resource": ""
} | ||
c23358 | train | // GetCerts returns trusted TLS certificates of certificate authorities | {
"resource": ""
} | ||
c23359 | train | // AddKnownHostKeys adds a new entry to 'known_hosts' file | {
"resource": ""
} | ||
c23360 | train | // GetKnownHostKeys returns all known public keys from 'known_hosts' | {
"resource": ""
} | ||
c23361 | train | // Initialize allows NodeCommand to plug itself into the CLI parser | {
"resource": ""
} | ||
c23362 | train | // Invite generates a token which can be used to add another SSH node
// to a cluster | {
"resource": ""
} | ||
c23363 | train | // ListActive retreives the list of nodes who recently sent heartbeats to
// to a cluster and prints it to stdout | {
"resource": ""
} | ||
c23364 | train | // GetTokenFromHOTPMockFile opens HOTPMock from file, gets token value,
// increases hotp and saves it to the file. Returns hotp token value. | {
"resource": ""
} | ||
c23365 | train | // useProxy reports whether requests to addr should use a proxy,
// according to the NO_PROXY or no_proxy environment variable.
// addr is always a canonicalAddr with a host and port. | {
"resource": ""
} | ||
c23366 | train | // Dial creates net.Conn to a SSH agent listening on a Windows named pipe.
// This is behind a build flag because winio.DialPipe is only available on
// Windows. | {
"resource": ""
} | ||
c23367 | train | // Infoln logs to INFO log. Arguments are handled in the manner of fmt.Println. | {
"resource": ""
} | ||
c23368 | train | // Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf. | {
"resource": ""
} | ||
c23369 | train | // Warningln logs to WARNING log. Arguments are handled in the manner of fmt.Println. | {
"resource": ""
} | ||
c23370 | train | // Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf. | {
"resource": ""
} | ||
c23371 | train | // Errorln logs to ERROR log. Arguments are handled in the manner of fmt.Println. | {
"resource": ""
} | ||
c23372 | train | // Handshake performs a SOCKS5 handshake with the client and returns
// the remote address to proxy the connection to. | {
"resource": ""
} | ||
c23373 | train | // readAuthenticationMethod reads in the authentication methods the client
// supports. | {
"resource": ""
} | ||
c23374 | train | // writeMethodSelection writes out the response to the authentication methods.
// Right now, only SOCKS5 and "no authentication methods" is supported. | {
"resource": ""
} | ||
c23375 | train | // readAddrType reads in the address type and returns the length of the dest
// addr field. | {
"resource": ""
} | ||
c23376 | train | // Write the response to the client. | {
"resource": ""
} | ||
c23377 | train | // readByte a single byte from the passed in net.Conn. | {
"resource": ""
} | ||
c23378 | train | // byteSliceContains checks if the slice a contains the byte b. | {
"resource": ""
} | ||
c23379 | train | // GetLoginShell determines the login shell for a given username. | {
"resource": ""
} | ||
c23380 | train | // GetRoles returns a list of roles to initiate for this secret | {
"resource": ""
} | ||
c23381 | train | // SetupUserCreds sets up user credentials for client | {
"resource": ""
} | ||
c23382 | train | // SetupUser sets up user in the cluster | {
"resource": ""
} | ||
c23383 | train | // GenerateUserCreds generates key to be used by client | {
"resource": ""
} | ||
c23384 | train | // StartNode starts a SSH node and connects it to the cluster. | {
"resource": ""
} | ||
c23385 | train | // StartNodeAndProxy starts a SSH node and a Proxy Server and connects it to
// the cluster. | {
"resource": ""
} | ||
c23386 | train | // StartProxy starts another Proxy Server and connects it to the cluster. | {
"resource": ""
} | ||
c23387 | train | // Reset re-creates the teleport instance based on the same configuration
// This is needed if you want to stop the instance, reset it and start again | {
"resource": ""
} | ||
c23388 | train | // AddUserUserWithRole adds user with assigned role | {
"resource": ""
} | ||
c23389 | train | // Adds a new user into i Teleport instance. 'mappings' is a comma-separated
// list of OS users | {
"resource": ""
} | ||
c23390 | train | // Start will start the TeleInstance and then block until it is ready to
// process requests based off the passed in configuration. | {
"resource": ""
} | ||
c23391 | train | // NewClientWithCreds creates client with credentials | {
"resource": ""
} | ||
c23392 | train | // StopProxy loops over the extra nodes in a TeleInstance and stops all
// nodes where the proxy server is enabled. | {
"resource": ""
} | ||
c23393 | train | // StopNodes stops additional nodes | {
"resource": ""
} | ||
c23394 | train | // ServeHTTP only accepts the CONNECT verb and will tunnel your connection to
// the specified host. Also tracks the number of connections that it proxies for
// debugging purposes. | {
"resource": ""
} | ||
c23395 | train | // Count returns the number of connections that have been proxied. | {
"resource": ""
} | ||
c23396 | train | // createAgent creates a SSH agent with the passed in private key and
// certificate that can be used in tests. This is useful so tests don't
// clobber your system agent. | {
"resource": ""
} | ||
c23397 | train | // SetClock sets the clock to use for key generation. | {
"resource": ""
} | ||
c23398 | train | // PrecomputeKeys sets up a number of private keys to pre-compute
// in background, 0 disables the process | {
"resource": ""
} | ||
c23399 | train | // New returns a new key generator. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.