public abstract class GSIClientRequestHandler extends GSIRequestHandler
| Modifier and Type | Class and Description |
|---|---|
protected class |
GSIClientRequestHandler.CertRequestBuckets |
protected class |
GSIClientRequestHandler.CertResponseBuckets |
| Modifier and Type | Field and Description |
|---|---|
protected XrootdTpcClient |
client |
protected static org.slf4j.Logger |
LOGGER |
ASYNC_CIPHER_MODE, bufferHandler, challenge, CHALLENGE_BYTES, credentialManager, CRYPTO_MODE, CRYPTO_MODE_NO_PAD, dhSession, lastRequest, MAX_TIME_SKEW, noPadding, PROTO_PRE_DELEGATION, PROTO_WITH_DELEGATION, PROTOCOL, PROTOCOL_VERSION, PUBLIC_KEY_ALGORITHM, PUBLIC_KEY_FOOTER, PUBLIC_KEY_HEADER, RANDOM, rsaSession, SESSION_IV_DELIM, SESSION_IV_LEN, SUPPORTED_CIPHER_ALGORITHM, SUPPORTED_DIGESTS, SYNC_CIPHER_BLOCKSIZE, SYNC_CIPHER_MODE_PADDED, SYNC_CIPHER_MODE_UNPADDED, SYNC_CIPHER_NAME| Modifier | Constructor and Description |
|---|---|
protected |
GSIClientRequestHandler(GSICredentialManager credentialManager,
XrootdTpcClient client) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract eu.emi.security.authn.x509.X509Credential |
getClientCredential() |
protected abstract Optional<Integer> |
getClientOpts() |
protected Optional<TpcSigverRequestEncoder> |
getSigverEncoder(XrootdTpcClient client) |
OutboundAuthenticationRequest |
handleCertReqStep()
Handle certreq step.
|
abstract OutboundAuthenticationRequest |
handleCertStep(InboundAuthenticationResponse response,
io.netty.channel.ChannelHandlerContext ctx) |
protected OutboundAuthenticationRequest |
handleCertStep(InboundAuthenticationResponse response,
io.netty.channel.ChannelHandlerContext ctx,
XrootdSecurityProtocol.BucketType dhParamBucket,
boolean signDhParams,
Optional<String> publicKeyPem,
Optional<String> userName)
The processing of this step differs between versions only in these details:
(A) the bucket containing DH params:
pre-4.9 = kXRS_puk, 4.9 = kXRS_cipher
(B) DH parameters are signed using the private key:
pre-4.9 no, 4.9 yes
(C) the public key of the client is included in a separate bucket:
pre-4.9 no, 4.9 in kXRS_puk
(D) a username bucket is included
pre-4.9 no, 4.9 yes
Otherwise, all the following must be done:
- validate cipher and digest
- extract and validate the server certificate
- verify the rtag challenge sent previously
- finalize the dh session from the dh params sent by server
- create the main bucket with signed challenge, new challenge
and serialized certificate of client
- add buckets for cipher, digest, dhParams, and optionally publicKey
and username.
|
protected abstract void |
loadClientCredential() |
protected abstract boolean |
usePadded() |
protected X509Certificate |
validateCertificate(InboundAuthenticationResponse inbound) |
protected String |
validateCiphers(InboundAuthenticationResponse inbound) |
protected String |
validateDigests(InboundAuthenticationResponse inbound) |
decryptMainBucketWithSessionKey, dhParams, extractChain, finalizeSessionKey, findSessionIVLen, generateChallengeString, getProtocolVersion, getSyncCipherMode, isRequestExpired, postProcessMainBucket, processRSAVerification, updateLastRequest, validateCiphers, validateCryptoMode, validateDigests, verifySignedRTagprotected static org.slf4j.Logger LOGGER
protected final XrootdTpcClient client
protected GSIClientRequestHandler(GSICredentialManager credentialManager, XrootdTpcClient client)
public OutboundAuthenticationRequest handleCertReqStep() throws XrootdException
XrootdExceptionpublic abstract OutboundAuthenticationRequest handleCertStep(InboundAuthenticationResponse response, io.netty.channel.ChannelHandlerContext ctx) throws XrootdException
XrootdExceptionprotected Optional<TpcSigverRequestEncoder> getSigverEncoder(XrootdTpcClient client)
protected X509Certificate validateCertificate(InboundAuthenticationResponse inbound) throws IOException, GeneralSecurityException, XrootdException
protected String validateCiphers(InboundAuthenticationResponse inbound) throws XrootdException
XrootdExceptionprotected String validateDigests(InboundAuthenticationResponse inbound) throws XrootdException
XrootdExceptionprotected OutboundAuthenticationRequest handleCertStep(InboundAuthenticationResponse response, io.netty.channel.ChannelHandlerContext ctx, XrootdSecurityProtocol.BucketType dhParamBucket, boolean signDhParams, Optional<String> publicKeyPem, Optional<String> userName) throws XrootdException
XrootdExceptionprotected abstract eu.emi.security.authn.x509.X509Credential getClientCredential()
protected abstract void loadClientCredential()
throws XrootdException
XrootdExceptionprotected abstract boolean usePadded()
Copyright © 2011-2020 dCache.org. All Rights Reserved.