JDK-8273024 : Update PKCS#11 Reference Guide with new attributes in provider configuration file
  • Type: Sub-task
  • Component: docs
  • Sub-Component: guides
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-08-26
  • Updated: 2021-09-01
  • Resolved: 2021-08-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17Fixed
Description
This defines the frequency for checking native reference during non-busy period, The PKCS11 guide needs updating to highlight 3 new configuration attributes (see below) for the SunPKCS11 Provider. Suggested text below:

Attribute: destroyTokenAfterLogout
Value: Boolean value, default: false
Description: If set to true, when `java.security.AuthProvider.logout()` is called upon the SunPKCS11 provider instance, the underlying Token object will be destroyed and resources will be freed. This essentially renders the SunPKCS11 provider instance unusable after logout() calls. Note that PKCS11 provider with this attribute set to true should not be added to system provider list since the provider object is not usable after logout() is called.

Attribute: cleaner.shortInterval
Value: Integer in milliseconds, default 2000.  The value must be at least 1000 ms.
Description: How often should native reference clearing be performed during busy period, i.e. the frequency that the cleaner thread processes the no-longer-needed native references in the queue to free up native memory. Note that cleaner thread will switch itself to the 'longInterval' frequency after 200 failed tries, i.e. no references found in the queue. 

Attribute: cleaner.longInterval
Value: Integer in milliseconds, default 60000.  The value must be at least 1000 ms.
Description: How often should cleaner thread check for native references during non-busy period, i.e. the frequency that the cleaner thread checks the queue for native references. Note that the cleaner thread will switch back to the 'shortInterval' value if native PKCS11 references for cleaning are detected.