EIDA / mediatorws

EIDA NG Mediator/Federator web services
GNU General Public License v3.0
6 stars 6 forks source link

fed: AAI #46

Open damb opened 5 years ago

damb commented 5 years ago

This is a proposal of @damb and @kaestli from the ETC meeting at Grenoble (09/2018). Comments are welcome.

damb commented 5 years ago

Some additional points we should think about:

When I'm talking about credentials I mean credentials within a eida-federator context.

kaestli commented 5 years ago

Consider that somebody could implement a script which does auth authentication at each start, and then use the temporary queryauth authentication while running. (this is probably not a bad idea, as like that, the user does not have to care about configuring valid queryauth temporary credentials) Then he / she will run multiple instances of this script in parallel. The second instance should not prematurely invalidate the temporary federator queryauth credentials still in use with the first instance.

Thus: yes, I think you should be able to have multiple valid federator queryauth credential sets for the same token.

andres-h commented 5 years ago

In case of SC3 FDSNWS implementation, "username" is a hash of the token, so the same token always returns the same username. If there is valid password (not expired), the same password is returned.

It is less secure, but avoids having multiple credential sets for the same token. Otherwise the number of credential sets per token can get huge if un-optimized scripts are used.

damb commented 5 years ago

The SC3 FDSNWS implement an in-memory user DB. I'd prefer a solution using a real DB in order to have the possibility to share one and the same user DB between multiple (e.g. containerized) eida-federator instances more easily. However, this would require storing hashes (due to security reasons).

The multi-credentials approach would imply to limit the number of credentials issued reasonably / or rather make it configurable.

damb commented 5 years ago

I'd like to implement token based authentication for eida-federator. In order to do it properly I need the following information:

Attachments:

andres-h commented 5 years ago

What token standard is currently in use? The token attached seems to be a ASCII file containing a GPG clearsigned JSON object. However, it does not agree with the JWT standard (RFC7519). If so, is the format provided somehow standardized?

The format is non-standard or "EIDA standard".

The token is PGP ASCII-armored, digitally signed JSON object. Only required attribute is "valid_until", the remaining attibutes (typically "mail", "memberof") are used by web services to grant access to data.

Federator does not need to parse the token, just store it and pass to web services as needed.

Maybe a standard like JWT can be implemented if needed.

B2ACCESS (eduGAIN, SAML) is not used directly by web services, only to obtain a token. Maybe B2ACCESS could be directly integrated into a portal like WebDC. Most SSO mechanisms are interactive and not suitable for scripts. Web services must support scripting.

I am aware of webisoget, but it is a hack that requires storing SSO credentials in plain text file. The whole idea of SSO is using single credentials for everything, so saving those credentials in a file is very dangerous.

The problem with eduGAIN is that it requires a formal and strict procedure to join. Many institutions are not able to join at all.

Another requirement was compatibility with FDSNWS (HTTP digest). If the FDSNWS standard is changed, there are better options.

damb commented 5 years ago

@andres-h, thanks for your clarifications.

Federator does not need to parse the token, just store it and pass to web services as needed.

On a public available service I would check the token format. Simply storing and accepting any content IMO isn't a good idea.

Maybe a standard like JWT can be implemented if needed.

:+1: