You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by GitBox <gi...@apache.org> on 2020/06/26 08:42:47 UTC
[GitHub] [directory-server] kwart commented on a change in pull request #38: [DIRKRB-744] Make the ReplayCache implementation configurable
kwart commented on a change in pull request #38:
URL: https://github.com/apache/directory-server/pull/38#discussion_r446050525
##########
File path: protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java
##########
@@ -255,4 +252,36 @@ public String toString()
return sb.toString();
}
+
+ private void initReplayCache()
+ {
+ LOG.debug( "initializing the kerberos replay cache" );
+
+ Class<? extends ReplayCache> clazz = config.getReplayCacheType();
+ if ( clazz == null )
+ {
+ LOG.trace( "Kerberos replay cache is disabled" );
+ return;
+ }
+
+ LOG.debug( "Creating ReplayCache of type {}", clazz.getName() );
+ ReplayCache instance = null;
+ try
+ {
+ try
+ {
+ instance = clazz.getConstructor( Long.TYPE ).newInstance( config.getAllowableClockSkew() );
+ }
+ catch ( NoSuchMethodException e )
+ {
+ instance = clazz.newInstance();
+ }
+ }
+ catch ( Exception e )
+ {
+ LOG.error( "Failed creating ReplayCache of type {}. Replay cache will not be used.", clazz.getName() );
Review comment:
Good point. Will do.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org