dto

package
v1.0.0-alpha1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InteractiveAuthAnswer

type InteractiveAuthAnswer struct {
	AuthID    string   `json:"authId,omitempty"`
	Responses []string `json:"responses"`
	Cancel    bool     `json:"cancel"`
}

InteractiveAuthAnswer is what the client sends back: one response per prompt, in prompt order, or Cancel to fail the login rather than leave it waiting.

AuthID is optional; on the subscribe socket it must match the current challenge.

type InteractiveAuthMessage

type InteractiveAuthMessage struct {
	Type    string                   `json:"type"`
	Auth    *InteractiveAuthResponse `json:"auth,omitempty"`
	AuthID  string                   `json:"authId,omitempty"`
	Message string                   `json:"message,omitempty"`
}

InteractiveAuthMessage is what the server sends on an interactive auth's websocket. Type is one of:

  • "challenge": the first message, carrying the auth and its prompts
  • "accepted": the answer was handed to the SSH handshake; the socket then closes
  • "error": Message says what was wrong; a bad answer can be resent
  • "idle": (subscribe socket only) nothing is waiting for an answer

On the subscribe socket "accepted" carries AuthID and the socket stays open.

type InteractiveAuthResponse

type InteractiveAuthResponse struct {
	AuthID          string       `json:"authId"`
	HostName        string       `json:"hostName"`
	Port            int          `json:"port"`
	LoginUser       string       `json:"loginUser"`
	SSHCredentialID string       `json:"sshCredentialId"`
	Banner          string       `json:"banner"`
	Name            string       `json:"name"`
	Instruction     string       `json:"instruction"`
	Prompts         []ssh.Prompt `json:"prompts"`
	CreatedAt       time.Time    `json:"createdAt"`
}

InteractiveAuthResponse is a keyboard-interactive challenge waiting for its owner to answer: where the connection is going and what the host asked.

The prompts are the host's questions only. Answers are never stored on anything a read can reach.

type SSHCredentialRequest

type SSHCredentialRequest struct {
	SSHCredentialName string  `json:"sshCredentialName"`
	PublicKey         string  `json:"publicKey"`
	PrivateKey        *string `json:"privateKey"`
	Passphrase        *string `json:"passphrase"`
	Password          *string `json:"password"`
	FullInteractive   bool    `json:"fullInteractive"`
}

SSHCredentialRequest is the create/update payload for a key.

PrivateKey is optional on the type because the same payload serves both create and update: creation requires it, while an update that omits it keeps the stored secret. That split cannot be expressed as a field constraint, so the service enforces it.

Java: org.apache.airavata.credentials.dto.SSHKeyRequestDto

func (*SSHCredentialRequest) Validate

func (r *SSHCredentialRequest) Validate() []httpx.FieldError

Validate implements httpx.Validator.

type SSHCredentialResponse

type SSHCredentialResponse struct {
	SSHCredentialID   string `json:"sshCredentialId"`
	SSHCredentialName string `json:"sshCredentialName"`
	PublicKey         string `json:"publicKey"`
	FullInteractive   bool   `json:"fullInteractive"`
	OwnerID           string `json:"ownerId"`
}

SSHCredentialResponse is the read model for a key.

It has no private key or passphrase field at all. That is the containment: the secrets cannot leak through this endpoint because there is nowhere for them to go.

There is no owner field on the request side: ownership comes from the access token and is immutable, so a key can neither be registered on someone else's behalf nor handed over by editing it.

Java: org.apache.airavata.credentials.dto.SSHKeyResponseDto

func ToSSHCredentialResponse

func ToSSHCredentialResponse(k *model.SSHCredential) SSHCredentialResponse

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL