OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.15k stars 587 forks source link

Update TAI javadoc regarding initialization #12864

Closed e-phan closed 4 years ago

e-phan commented 4 years ago

Describe the bug The TrustAssociationInterceptor (TAI) javadoc in the Liberty IBM knowledge center is misleading. It suggests that the initialization status is checked when a TAI is invoked, and that the properties com.ibm.websphere.security.trustassociation.initStatus and com.ibm.websphere.security.trustassociation.ignoreInitStatus can be used.

The return status is now checked before using the trust association interceptor implementation. A return of 0 is considered SUCCESS and anything else a FAILURE. If your previous implementation of the TAI returns a different error status you can either change your implementation to match the expectations or do one of the following:

  1. Add the property com.ibm.websphere.security.trustassociation.initStatus in the Trust Association Interceptor custom properties and set it to the value that indicates SUCCESS in your implementation. All other values imply failure. In case of failure, the corresponding TAI implementation will not be used. OR
  2. Add the property com.ibm.websphere.security.trustassociation.ignoreInitStatus in the Trust Association Interceptor custom properties and set it to true to indicate to WebSphere to ignore the status of this method. In this case WebSphere will not check the return status from this method just like in the earlier versions.

But this is not how Liberty behaves. When a TAI is configured, it is invoked (at least for the isTargetInterceptor method) regardless of the initialization status. The javadoc needs to be updated accordingly and maybe needs to state that the initialization status is not checked.

Steps to Reproduce N/A

Expected behavior N/A

Diagnostic information:

Additional context N/A

utle commented 4 years ago

Fixed by https://github.com/OpenLiberty/open-liberty/pull/12847