Movatterモバイル変換


[0]ホーム

URL:


Notice  The highest tagged major version isv9.

samlinvalidate

package
v8.19.1Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License:Apache-2.0Imports:12Imported by:4

Details

Repository

github.com/elastic/go-elasticsearch

Links

Documentation

Overview

Invalidate SAML.

Submit a SAML LogoutRequest message to Elasticsearch for consumption.

NOTE: This API is intended for use by custom web applications other thanKibana.If you are using Kibana, refer to the documentation for configuring SAMLsingle-sign-on on the Elastic Stack.

The logout request comes from the SAML IdP during an IdP initiated SingleLogout.The custom web application can use this API to have Elasticsearch process the`LogoutRequest`.After successful validation of the request, Elasticsearch invalidates theaccess token and refresh token that corresponds to that specific SAMLprincipal and provides a URL that contains a SAML LogoutResponse message.Thus the user can be redirected back to their IdP.

Index

Constants

This section is empty.

Variables

View Source
var ErrBuildPath =errors.New("cannot build path, check for missing path parameters")

ErrBuildPath is returned in case of missing parameters within the build of the request.

Functions

This section is empty.

Types

typeNewSamlInvalidate

type NewSamlInvalidate func() *SamlInvalidate

NewSamlInvalidate type alias for index.

funcNewSamlInvalidateFunc

func NewSamlInvalidateFunc(tpelastictransport.Interface)NewSamlInvalidate

NewSamlInvalidateFunc returns a new instance of SamlInvalidate with the provided transport.Used in the index of the library this allows to retrieve every apis in once place.

typeRequest

type Request struct {// Acs The Assertion Consumer Service URL that matches the one of the SAML realm in// Elasticsearch that should be used. You must specify either this parameter or// the `realm` parameter.Acs *string `json:"acs,omitempty"`// QueryString The query part of the URL that the user was redirected to by the SAML IdP to// initiate the Single Logout.// This query should include a single parameter named `SAMLRequest` that// contains a SAML logout request that is deflated and Base64 encoded.// If the SAML IdP has signed the logout request, the URL should include two// extra parameters named `SigAlg` and `Signature` that contain the algorithm// used for the signature and the signature value itself.// In order for Elasticsearch to be able to verify the IdP's signature, the// value of the `query_string` field must be an exact match to the string// provided by the browser.// The client application must not attempt to parse or process the string in any// way.QueryStringstring `json:"query_string"`// Realm The name of the SAML realm in Elasticsearch the configuration. You must// specify either this parameter or the `acs` parameter.Realm *string `json:"realm,omitempty"`}

Request holds the request body struct for the package samlinvalidate

https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_invalidate/Request.ts#L22-L61

funcNewRequestadded inv8.5.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request)FromJSONadded inv8.5.0

func (r *Request) FromJSON(datastring) (*Request,error)

FromJSON allows to load an arbitrary json into the request structure

typeResponseadded inv8.7.0

type Response struct {// Invalidated The number of tokens that were invalidated as part of this logout.Invalidatedint `json:"invalidated"`// Realm The realm name of the SAML realm in Elasticsearch that authenticated the// user.Realmstring `json:"realm"`// Redirect A SAML logout response as a parameter so that the user can be redirected back// to the SAML IdP.Redirectstring `json:"redirect"`}

Response holds the response body struct for the package samlinvalidate

https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_invalidate/Response.ts#L22-L37

funcNewResponseadded inv8.7.0

func NewResponse() *Response

NewResponse returns a Response

typeSamlInvalidate

type SamlInvalidate struct {// contains filtered or unexported fields}

funcNew

Invalidate SAML.

Submit a SAML LogoutRequest message to Elasticsearch for consumption.

NOTE: This API is intended for use by custom web applications other thanKibana.If you are using Kibana, refer to the documentation for configuring SAMLsingle-sign-on on the Elastic Stack.

The logout request comes from the SAML IdP during an IdP initiated SingleLogout.The custom web application can use this API to have Elasticsearch process the`LogoutRequest`.After successful validation of the request, Elasticsearch invalidates theaccess token and refresh token that corresponds to that specific SAMLprincipal and provides a URL that contains a SAML LogoutResponse message.Thus the user can be redirected back to their IdP.

https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html

func (*SamlInvalidate)Acsadded inv8.9.0

Acs The Assertion Consumer Service URL that matches the one of the SAML realm inElasticsearch that should be used. You must specify either this parameter orthe `realm` parameter.API name: acs

func (SamlInvalidate)Do

func (rSamlInvalidate) Do(providedCtxcontext.Context) (*Response,error)

Do runs the request through the transport, handle the response and returns a samlinvalidate.Response

func (*SamlInvalidate)ErrorTraceadded inv8.14.0

func (r *SamlInvalidate) ErrorTrace(errortracebool) *SamlInvalidate

ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errorswhen they occur.API name: error_trace

func (*SamlInvalidate)FilterPathadded inv8.14.0

func (r *SamlInvalidate) FilterPath(filterpaths ...string) *SamlInvalidate

FilterPath Comma-separated list of filters in dot notation which reduce the responsereturned by Elasticsearch.API name: filter_path

func (*SamlInvalidate)Header

func (r *SamlInvalidate) Header(key, valuestring) *SamlInvalidate

Header set a key, value pair in the SamlInvalidate headers map.

func (*SamlInvalidate)HttpRequest

func (r *SamlInvalidate) HttpRequest(ctxcontext.Context) (*http.Request,error)

HttpRequest returns the http.Request object built from thegiven parameters.

func (*SamlInvalidate)Humanadded inv8.14.0

func (r *SamlInvalidate) Human(humanbool) *SamlInvalidate

Human When set to `true` will return statistics in a format suitable for humans.For example `"exists_time": "1h"` for humans and`"eixsts_time_in_millis": 3600000` for computers. When disabled the humanreadable values will be omitted. This makes sense for responses beingconsumedonly by machines.API name: human

func (SamlInvalidate)Performadded inv8.7.0

func (rSamlInvalidate) Perform(providedCtxcontext.Context) (*http.Response,error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*SamlInvalidate)Prettyadded inv8.14.0

func (r *SamlInvalidate) Pretty(prettybool) *SamlInvalidate

Pretty If set to `true` the returned JSON will be "pretty-formatted". Only usethis option for debugging only.API name: pretty

func (*SamlInvalidate)QueryStringadded inv8.9.0

func (r *SamlInvalidate) QueryString(querystringstring) *SamlInvalidate

QueryString The query part of the URL that the user was redirected to by the SAML IdP toinitiate the Single Logout.This query should include a single parameter named `SAMLRequest` thatcontains a SAML logout request that is deflated and Base64 encoded.If the SAML IdP has signed the logout request, the URL should include twoextra parameters named `SigAlg` and `Signature` that contain the algorithmused for the signature and the signature value itself.In order for Elasticsearch to be able to verify the IdP's signature, thevalue of the `query_string` field must be an exact match to the stringprovided by the browser.The client application must not attempt to parse or process the string in anyway.API name: query_string

func (*SamlInvalidate)Raw

Raw takes a json payload as input which is then passed to the http.RequestIf specified Raw takes precedence on Request method.

func (*SamlInvalidate)Realmadded inv8.9.0

func (r *SamlInvalidate) Realm(realmstring) *SamlInvalidate

Realm The name of the SAML realm in Elasticsearch the configuration. You mustspecify either this parameter or the `acs` parameter.API name: realm

func (*SamlInvalidate)Request

func (r *SamlInvalidate) Request(req *Request) *SamlInvalidate

Request allows to set the request property with the appropriate payload.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp