ssoagent

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

README

An sso-agent component is an instance of the Geneos SSO Agent to provide Single-Sign On authentication to other Geneos components.

It requires Java to be installed and, unless the default configuration is changed, looks for /usr/bin/java.

If you already have a stand-alone instance of the SSO Agent and want to bring it under the control the geneos program you can do something like this:

$ geneos deploy sso-agent --import /path/to/existing/sso-agent/conf --user email@example.com
Password:

This will download and install the latest SSO Agent install package from the ITRS download site using the credentials email@example.com and prompting you for your password. The --import option pulls in the existing configuration files (including the keystore/trust store) from the path given. Be careful to not end the path in a / as this copies the contents of a directory without the directory name itself!

Once this is done you can start the sso-agent instance and it should work like the stand-alone one.

The deploy a new sso-agent instance, use the same command but leave out the --import ... arguments. Then you have to edit the conf/sso-agent.conf file in the instance directory (geneos ls to see the paths or geneos home sso-agent NAME to get just the specific path) to set the correct listening port and other mandatory parameters. At this time geneos does not manage any of the settings for you, even though the command tells you it has added an instance with a specific port number.

The trust store and key store files (normally the same file) are initialised during deployment and if you have configured geneos TLS then the instance certificate and private key are added to the files as well as a freshly created ssokey for the process to sign the authentication tokens.

Documentation

Index

Constants

View Source
const Name = "webserver"

Variables

View Source
var SSOAgent = geneos.Component{
	Name:         "sso-agent",
	Aliases:      []string{"ssoagent", "sso"},
	LegacyPrefix: "sso",

	DownloadNameRegexp: regexp.MustCompile(`^(?<component>[\w-]+)-(?<version>[\d\-\.]+)(-(?<platform>\w+))?[\.-]bin.(?<suffix>zip)$`),
	DownloadParams:     &[]string{},
	DownloadParamsNexus: &[]string{
		"maven.classifier=bin",
		"maven.extension=zip",
		"maven.groupId=com.itrsgroup.geneos",
	},
	DownloadBase:  geneos.DownloadBases{Default: "SSO+Agent", Nexus: "sso-agent"},
	DownloadInfix: "sso-agent",

	GlobalSettings: map[string]string{
		config.Join(Name, "ports"): "1180-",
		config.Join(Name, "clean"): strings.Join([]string{
			"*.old",
		}, ":"),
		config.Join(Name, "purge"): strings.Join([]string{
			"*.log",
			"*.txt",
			"logs/*.log",
			"logs/*.gz",
		}, ":"),
	},
	PortRange: config.Join(Name, "ports"),
	CleanList: config.Join(Name, "clean"),
	PurgeList: config.Join(Name, "purge"),
	ConfigAliases: map[string]string{
		config.Join(Name, "ports"): Name + "portrange",
		config.Join(Name, "clean"): Name + "cleanlist",
		config.Join(Name, "purge"): Name + "purgelist",
	},

	LegacyParameters: map[string]string{},
	Defaults: []string{
		`binary=java`,
		`home={{join .root "sso-agent" "sso-agents" .name}}`,
		`install={{join .root "packages" "sso-agent"}}`,
		`version=active_prod`,
		`program={{"/usr/bin/java"}}`,
		`logdir=logs`,
		`logfile=sso-agent.log`,
		`port=1180`,
		`libpaths={{join "${config:install}" "${config:version}" "lib"}}`,
		`autostart=true`,

		`truststore={{join "${config:home}" "cacerts"}}`,
	},

	Directories: []string{
		"packages/sso-agent",
		"sso-agent/sso-agents",
	},
	GetPID: pidCheckFn,
}

Functions

This section is empty.

Types

type SSOAgents

type SSOAgents instance.Instance

func (*SSOAgents) Add

func (s *SSOAgents) Add(tmpl string, port uint16) (err error)

func (*SSOAgents) Command

func (s *SSOAgents) Command() (args, env []string, home string)

func (*SSOAgents) Config

func (w *SSOAgents) Config() *config.Config

func (*SSOAgents) Home

func (w *SSOAgents) Home() string

func (*SSOAgents) Host

func (w *SSOAgents) Host() *geneos.Host

func (*SSOAgents) Load

func (w *SSOAgents) Load() (err error)

func (*SSOAgents) Loaded

func (w *SSOAgents) Loaded() time.Time

func (*SSOAgents) Name

func (w *SSOAgents) Name() string

func (*SSOAgents) Rebuild

func (s *SSOAgents) Rebuild(initial bool) (err error)

func (*SSOAgents) Reload

func (w *SSOAgents) Reload() (err error)

func (*SSOAgents) SetLoaded

func (w *SSOAgents) SetLoaded(t time.Time)

func (*SSOAgents) String

func (w *SSOAgents) String() string

func (*SSOAgents) Type

func (w *SSOAgents) Type() *geneos.Component

Return the Component for an Instance

func (*SSOAgents) Unload

func (w *SSOAgents) Unload() (err error)

Jump to

Keyboard shortcuts

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