Skip to content

Commit 852b6f8

Browse files
authored
Merge pull request #10 from brianmajor/master
SSO Next (2.1 or 3.0)
2 parents 7a0e904 + fccdd76 commit 852b6f8

File tree

2 files changed

+102
-12
lines changed

2 files changed

+102
-12
lines changed

doc/Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
DOCNAME = SSO
55

66
# count up; you probably do not want to bother with versions <1.0
7+
# new doc version (2.1 or 3.0) to be decided later
78
DOCVERSION = 2.0
89

910
# Publication date, ISO format; update manually for "releases"
10-
DOCDATE = 2017-05-24
11+
DOCDATE = 2022-04-29
1112

1213
# What is it you're writing: NOTE, WD, PR, or REC
13-
DOCTYPE = REC
14+
DOCTYPE = WD
1415

1516
# Source files for the TeX document (but the main file must always
1617
# be called $(DOCNAME).tex

doc/SSO.tex

+99-10
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
\author{Andr\'e Schaaff}
1717
\author{Guy Rixon}
1818
\author{Brian Major}
19+
\author{Patrick Dowler}
20+
\author{Mark Taylor}
1921

20-
\editor{Giuliano Taffoni}
22+
\editor{Sara Bertocco}
2123

2224
\previousversion[http://www.ivoa.net/documents/SSO/20160930/index.html]{WD-20160930}
2325
\previousversion[http://www.ivoa.net/Documents/cover/SSOAuthMech-20080124.html]{REC-1.01}
@@ -55,7 +57,7 @@ \section*{Conformance-related definitions}
5557

5658
\section{Introduction}
5759
IVOA's single-sign-on architecture is a system in which users assign cryptographic credentials to user agents so that the agents may act with the user's identity and access rights. This standard describes how agents use those credentials to authenticate the user's identity in requests to services. This standard describes also the authentication mechanism of an application or a service making a call (on behalf of someone or something else) to an API or to another service.
58-
This document is essentially a {\em profile} against existing security standards; that is, it describes how an existing standard should be applied in an IVOA application to support single sign-on capabilities in the IVOA. In the following sections, we make specific references to details spelled out in these standards. For the purposes of validating against this standard, those referenced documents should be consulted for a full explanation of those details. Unfortunately, a reader that is unfamiliar with these external standards might find this specification confusing. To alleviate this problem, each major section is concluded by a Commentary subsection that provides some explanations of the detailed terms and concepts being referred to. The Commentary subsection may also provide recommended scenarios for how this specification might actually be realised. Note that the statements in the Commentary subsections are non-normative and should not be considered part of precise specification; nevertheless, they are indicative of the intended spirit of this document.
60+
This document describes how clients can discover and use authentication mechansims supported by a service, and how services advertise their support of those authentication mechanisms. Additionally, it conveys a {\em profile} of existing security standards; that is, it describes how an existing standard should be applied in an IVOA application to support single sign-on capabilities in the IVOA. In the following sections, we make specific references to details spelled out in these standards. For the purposes of validating against this standard, those referenced documents should be consulted for a full explanation of those details. Each major section is concluded by a Commentary subsection that provides some explanations of the detailed terms and concepts being referred to. The Commentary subsection may also provide recommended scenarios for how this specification might actually be realised. Note that the statements in the Commentary subsections are non-normative and should not be considered part of precise specification; nevertheless, they are indicative of the intended spirit of this document.
5961

6062
\subsection{Role within the VO Architecture}
6163

@@ -76,11 +78,69 @@ \subsection{Role within the VO Architecture}
7678
Fig.~\ref{fig:archdiag} shows the role this document plays within the
7779
IVOA architecture \citep{2010ivoa.rept.1123A}.
7880

81+
\section{Authentication Discovery}
82+
83+
Of the authentication mechanisms listed in section \ref{sec:authentication-mechanisms}, Authentication Mechanisms, some of them can be used exactly as their associated specifications dictate, including how to discover their support. Some of them are intended to be used in an HTTP browser environment, and thus discovery is performed interactively by end users. However, to support non-browser clients (standalone applications and command line tools), the follow procedures can be used to programmatically and interoperabily discover and use the associated authentication mechansim. These procedures are extensions to the existing standards and are built upon HTTP standards themselves.
84+
85+
\subsection{IVOA Challenges}
86+
87+
Services that support one of the approved authentication mechanisms may advertise this through the use of \emph{www-authenticate} HTTP response headers, as defined by \citep{std:RFC7235}. The basic form of this header is:
88+
89+
\begin{verbatim}
90+
www-authenticate: {auth-scheme} {scheme-specific-params}
91+
\end{verbatim}
92+
93+
Where \emph{auth-scheme} is a reference to the authentication mechanism, and \emph{scheme-specific-params} conveys service-specific details on the use of the identified authentication mechansim.
94+
95+
For example:
96+
97+
\begin{verbatim}
98+
www-authenticate: ivoa_bearer standard_id="ivo://ivoa.net/sso#tls-with-password", access_url="https://example.org/login"
99+
\end{verbatim}
100+
101+
As seen above, the \emph{scheme-specific-params} contains two standard parameters:
102+
103+
\begin{itemize}
104+
\item{\emph{standard\_id}} - Describes how to obtain the credentials, and refers to one of the authentication mechanisms outlined in this document. Clients can obtain tokens according to the rules for that standard ID.
105+
\item{\emph{access\_url}} - Describes where to obtain the credentials. It is the URL to use in the process.
106+
\end{itemize}
107+
108+
The list of challenges and their meanings that are recognized by the IVOA are described below. Multiple chanllenges may be in a service's response. Clients can choose whichever one they understand or prefer.
109+
110+
\textbf{Bearer} - The OAuth2 \citep{std:RFC6749} challenge for a Bearer token. It means one can autheticate with a Bearer token, but does not communicate the details of how such tokens can be obtained.
111+
112+
\textbf{ivoa_bearer} - The ivoa_bearer challenge also means that one can authticate with an OAuth2 Bearer token, but will also include details on obtaining such tokens through the two parameters, \emph{standard\id}, and \emph{access\.
113+
114+
\textbf{ivoa_x509} - The ivoa_x509 challenge is an indication that you can authenticate with an X.509 client certificate (including self-signed proxy certificates). There are two variants: one with the two parameters, \emph{standard\id}, and \emph{access\}, and one without. The one with parameters tells the client they can get an acceptable client cert via the described mechanism. (For sites that provide their own cert certificate authority.) The second, without params, says that the service accepts client certificates from external certificate authorities.
115+
116+
\textbf{ivoa_cookie} - The ivoa_cookie challenge also means that one can authticate with an HTTP Cookie, and may also include details on obtaining cookies through the two parameters, \emph{standard\id}, and \emph{access\.
117+
118+
\subsection{Bootstrapping}
119+
120+
How does a client start and how does a service signal that there is \emph{optional}, \emph{required}, or \emph{no} authentication? First, it must be noted that the above www-authenticate challenges can be returned in any response, but typically in 200, 401, or 403. And it must be emphasized that any endpoint can respond with those challenges if something changes. (For example, a token expires, or an attempt to access a protected resource is made.)
121+
122+
For clients to initially find the level of authentication (to bootstrap), they can make anonymous HTTP GET or HTTP HEAD requests to the service's /capabilities endpoint. (See VO Support Interfaces (VOSI) (\citep{2017ivoa.spec.0524G}.) Responses from this call to /capabilities include:
123+
124+
\begin{itemize}
125+
\item{\emph{200}} with no www-authenticate headers: anonymous access only (no authentication)
126+
\item{\emph{200}} with www-authenticate headers: authentication optional
127+
\item{\emph{401}} with www-authenticate headers: authentication required
128+
\end{itemize}
129+
130+
[Editor's note: two changes to VOSI are required: 1) VOSI augmented to require http HEAD support for /capabilities endpoints, and 2) Modify VOSI to allow /capabilities to respond with 401 (or 403) (also affects TAP 1.1 sec 2; & others?)]
131+
132+
\subsection{Checking Authentication}
133+
134+
Clients can also check current credentials with an HTTP HEAD call to /capabilities and then look for the header \emph{x-vo-authenticated} in the response. If present, it means that the service recognized it as an authenticated call. The value of this header should identify the user, such as the user's username, or X.509 distinguished name. The scope of the uniqueness of this value is undefined.
135+
136+
Services may choose to include the x-vo-authenticated header in all requests (not just to /capabilities) made where user authentication was successful.
137+
138+
\subsection{SecurityMethod}
139+
140+
[Editor's note: Should this section remain?]
79141
80-
\section{Scope of this standard}
81-
\subsection{Requirements}
82142
When a service is registered in an IVOA registry, that service's resource document MAY include metadata expressing conformance to one or more of the authentication mechanisms approved in the IVOA SSO profile. Such a service MUST implement those mechanisms as described in this document, and clients of the service MUST participate in the mechanism when calling the service. If a service does not provide any SSO specification it is assumed that no authentication is required.
83-
The registration of the service interface SHALL contain an XML element
143+
The registration of the service interface MAY contain an XML element
84144
of type \xmlel{SecurityMethod} as specified in the XML schema for
85145
VOResource \citep{2018ivoa.spec.0625P}. The value of this element distinguishes the
86146
authentication mechanism using the values stated in the sections below.
@@ -125,7 +185,8 @@ \subsection{Commentary}
125185
the service is {\em SAML}, then {\em cookies}, and finally, if the others are not available,
126186
{\em OpenID}.
127187
128-
\section{Approved authentication mechanisms}
188+
\section{Authentication Mechanisms}
189+
\label{sec:authentication-mechanisms}
129190
130191
The following authentication mechanisms are approved for use in the SSO profile.
131192
\begin{itemize}
@@ -218,10 +279,30 @@ \subsection{Commentary}
218279
219280
\section{Details of TLS-with-password}
220281
\subsection{Requirements}
221-
The user-name and password SHALL be passed in the message protected by the TLS mechanism,
222-
not as part of the mechanism itself.
282+
The username and password SHALL be passed in the message protected by the TLS mechanism, and, with a valid password credential, a Bearer token SHALL be returned, also protected by the TLS mechanism.
223283
224-
Interfaces using this mechanism SHALL be registered with the security method
284+
The HTTP POST form parameters to be used in tls-with-password are:
285+
\paragraph{username} - The username to use for login
286+
\paragraph{password} - The password to use for login
287+
288+
When valid credentials (username and password) are used, the service responses with a 200 response code and uses the \emph{x-vo-bearer} response header to return an OAuth2 Bearer token. For example:
289+
290+
\begin{verbatim}
291+
curl -d 'username={userid}' -d 'password={password}' https://example.org/login
292+
< http/1.1 200
293+
< x-vo-authenticated: {userid}
294+
< x-vo-bearer: {token}
295+
\end{verbatim}
296+
297+
When invalid credentials are used, the service resonsds with a 401 response code and optional message in the response body. For example,
298+
299+
\begin{verbatim}
300+
curl -d 'username={userid}' -d 'password={password}' https://example.org/login
301+
< http/1.1 401
302+
invalid username or password
303+
\end{verbatim}
304+
305+
Interfaces using this mechanism SHALL be registered with the security method
225306
226307
\texttt{ivo://ivoa.net/sso\#tls-with-password}
227308
@@ -291,7 +372,15 @@ \section{Details on OAuth}
291372
\subsection{Requirements}
292373
Services using OAuth authentication mechanisms SHALL do so according to the RFC6749 \citep{std:RFC6749}.
293374
294-
Interfaces using this mechanism SHALL be registered with the security method
375+
Clients perform authentication with OAuth Bearer tokens using the \emph{authorization} header. For example:
376+
377+
\begin{verbatim}
378+
curl -H 'authorization: Bearer {token}' https://example.org/tap
379+
< http/1.1 200
380+
< x-vo-authenticated: {username}
381+
\end{verbatim}
382+
383+
Interfaces using this mechanism SHALL be registered with the security method
295384
296385
\texttt{ivo://ivoa.net/sso\#OAuth}
297386

0 commit comments

Comments
 (0)