Interface SecurityScheme
- All Superinterfaces:
org.gcube.informationsystem.base.reference.Element,GCubeProperty,org.gcube.informationsystem.model.reference.ModelElement,org.gcube.informationsystem.model.reference.properties.Property,org.gcube.informationsystem.base.reference.properties.PropertyElement,org.gcube.informationsystem.base.reference.SchemaMixedElement,Serializable
- All Known Subinterfaces:
HTTPSecurityScheme
- All Known Implementing Classes:
HTTPSecuritySchemeImpl,SecuritySchemeImpl
@TypeMetadata(name="SecurityScheme",
description="SecurityScheme describes how a client authenticates to an access point: the authentication mechanism, where the credentials are obtained or verified, and a human-readable description. The name of a mechanism is meaningful only within the framework it belongs to (\'Bearer\' is an HTTP authentication scheme, \'SCRAM-SHA-256\' a SASL mechanism), so this type is abstract: each extension defines the framework the credentials belong to, and so the registry the scheme is taken from. HTTPSecurityScheme covers credentials sent in an HTTP header (RFC 9110, section 11: https://www.rfc-editor.org/rfc/rfc9110#section-11). As an illustration only, not modelled: a SASL-based extension (databases, message brokers, LDAP, SMTP) would take the scheme from the IANA SASL Mechanisms registry (https://www.iana.org/assignments/sasl-mechanisms), e.g. \'SCRAM-SHA-256\' (RFC 7677), or \'OAUTHBEARER\' (RFC 7628) with the url pointing to the token issuer, e.g. {\"scheme\": \"OAUTHBEARER\", \"url\": \"https://accounts.d4science.org/auth/realms/d4science/.well-known/openid-configuration\"}; an SSH extension would take it from the IANA SSH Authentication Method Names (https://www.iana.org/assignments/ssh-parameters), e.g. \'publickey\' (RFC 4252).",
version="1.0.0")
@Change(version="1.0.0",
description="First Version")
public interface SecurityScheme
extends GCubeProperty
SecurityScheme describes how a client authenticates to an access point: the authentication
mechanism, where the credentials are obtained or verified, and a human-readable description.
The name of a mechanism is meaningful only within the framework it belongs to (Bearer is an
HTTP authentication scheme, SCRAM-SHA-256 a SASL mechanism). This type is therefore
abstract: each extension defines the framework the credentials belong to, and so the registry the
scheme is taken from.
HTTPSecuritySchemecovers credentials sent in an HTTP header (RFC 9110, section 11).
As an illustration only, not modelled: a SASL-based extension (databases, message brokers,
LDAP, SMTP) would take scheme from the
IANA SASL Mechanisms registry, e.g.
SCRAM-SHA-256 (RFC 7677), or
OAUTHBEARER (RFC 7628) with url
pointing to the token issuer:
{ "scheme": "OAUTHBEARER",
"url": "https://accounts.d4science.org/auth/realms/d4science/.well-known/openid-configuration" }
an SSH extension would take it from the
IANA SSH Authentication Method Names,
e.g. publickey (RFC 4252).
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the property holding the human-readable descriptionstatic final StringThe name associated with this propertystatic final StringThe name of the property holding the specification defining the schemestatic final StringThe name of the property holding the authentication mechanismstatic final StringThe name of the property holding where the credentials are obtained or verifiedFields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USERFields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionA human-readable description of the security scheme, e.g.The specification defining the scheme, as cited by the registry of the extension, written as a Markdown link, e.g.The name of the authentication mechanism, taken from the registry of the framework the extension defines, e.g.getURL()Where the credentials are obtained or verified, e.g. the discovery document of the OpenID Connect provider issuing the tokens (OpenID Connect Discovery 1.0), such ashttps://accounts.d4science.org/auth/realms/d4science/.well-known/openid-configurationfor the D4Science IAM, or the portal issuing API keys.voidsetDescription(String description) Sets the human-readable description of the security schemevoidsetReference(String reference) Sets the specification defining the schemevoidSets the name of the authentication mechanismvoidSets where the credentials are obtained or verifiedMethods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeNameMethods inherited from interface org.gcube.informationsystem.model.reference.ModelElement
getExpectedtype, getSupertypesMethods inherited from interface org.gcube.informationsystem.model.reference.properties.Property
getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
-
Field Details
-
NAME
The name associated with this property- See Also:
-
SCHEME_PROPERTY
The name of the property holding the authentication mechanism- See Also:
-
URL_PROPERTY
The name of the property holding where the credentials are obtained or verified- See Also:
-
REFERENCE_PROPERTY
The name of the property holding the specification defining the scheme- See Also:
-
DESCRIPTION_PROPERTY
The name of the property holding the human-readable description- See Also:
-
-
Method Details
-
getScheme
@ISProperty(name="scheme", description="The name of the authentication mechanism, taken from the registry of the framework the extension defines, e.g. \'Bearer\' for an HTTPSecurityScheme (IANA HTTP Authentication Scheme Registry: https://www.iana.org/assignments/http-authschemes).") String getScheme()The name of the authentication mechanism, taken from the registry of the framework the extension defines, e.g.Bearerfor anHTTPSecurityScheme(IANA HTTP Authentication Scheme Registry).- Returns:
- the name of the authentication mechanism
-
setScheme
Sets the name of the authentication mechanism- Parameters:
scheme- the name of the authentication mechanism, e.g.Bearer
-
getReference
@ISProperty(name="reference", description="The specification defining the scheme, as cited by the registry of the extension, written as a Markdown link, e.g. \'[RFC 6750](https://www.rfc-editor.org/rfc/rfc6750)\' or \'[RFC 9449, Section 7.1](https://www.rfc-editor.org/rfc/rfc9449#section-7.1)\'; plain text when there is no link.") String getReference()The specification defining the scheme, as cited by the registry of the extension, written as a Markdown link, e.g.[RFC 6750](https://www.rfc-editor.org/rfc/rfc6750)or[RFC 9449, Section 7.1](https://www.rfc-editor.org/rfc/rfc9449#section-7.1); plain text when there is no link.- Returns:
- the specification defining the scheme
-
setReference
Sets the specification defining the scheme- Parameters:
reference- the specification defining the scheme, as a Markdown link
-
getURL
@ISProperty(name="url", description="Where the credentials are obtained or verified, e.g. the discovery document of the OpenID Connect provider issuing the tokens (OpenID Connect Discovery 1.0: https://openid.net/specs/openid-connect-discovery-1_0.html), such as \'https://accounts.d4science.org/auth/realms/d4science/.well-known/openid-configuration\' for the D4Science IAM, or the portal issuing API keys.") URI getURL()Where the credentials are obtained or verified, e.g. the discovery document of the OpenID Connect provider issuing the tokens (OpenID Connect Discovery 1.0), such ashttps://accounts.d4science.org/auth/realms/d4science/.well-known/openid-configurationfor the D4Science IAM, or the portal issuing API keys.- Returns:
- where the credentials are obtained or verified
-
setURL
Sets where the credentials are obtained or verified- Parameters:
url- where the credentials are obtained or verified, e.g. the OpenID Connect discovery document of the issuer
-
getDescription
@ISProperty(name="description", description="A human-readable description of the security scheme, e.g. \'Tokens issued by the D4Science IAM for the Context of the call\'.") String getDescription()A human-readable description of the security scheme, e.g.Tokens issued by the D4Science IAM for the Context of the call.- Returns:
- the description
-
setDescription
Sets the human-readable description of the security scheme- Parameters:
description- the description
-