OpenSearch/src/main/java/org/elasticsearch/shield/authc/AuthenticationToken.java
c-a-m da3aacf107 Passwords: SecuredString to lock down and clear password usage.
SecuredString encapsulates handling of passwords and clearing them when done.  This change
includes changing everywhere passwords are used.  After authentication the authentication service will
clear the token - which will clear the password.  This avoids using any passwords in String objects.

This also adds commentary to BCrypt to show how it changed from the original external resource.  It moves utility methods to CharArrays.

Original commit: elastic/x-pack-elasticsearch@d0ffbae5c8
2014-09-26 10:39:04 -06:00

19 lines
417 B
Java

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
package org.elasticsearch.shield.authc;
/**
*
*/
public interface AuthenticationToken {
String principal();
Object credentials();
void clearCredentials();
}