[ 
https://issues.apache.org/jira/browse/OAK-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16030719#comment-16030719
 ] 

Robert Munteanu commented on OAK-6144:
--------------------------------------

[~baedke]: {quote}I tried to add a new method to an interface marked as 
@ProviderType and expected that a minor version increase would be sufficient to 
make the baseline plugin happy. Wrong?{quote}

That should work. Can you add the exact output here and maybe the updated 
patch? I added a @ProviderType annotation to {{ExternalIdentity}} and the 
baseline check was satisfied.

[~tripod]: {quote}AFAIK, the default is @ConsumerType. switching to 
@ProviderType already mandates a major version increase. {quote}

That is indeed the default value. However, the annotation has a RetentionPolicy 
of class and as such does not affect the class behaviour at runtime, so bnd 
should exclude it from the baseline calculations. Also, I don't get the problem 
that Manfred reported.

For the record, I:

# applied the patch attached to this issue
# added the {{@ProviderType}} annotation to {{ExternalIdentity}}
# built oak:  {{mvn clean verify -am -pl oak-auth-external -DskipTests}}
# ran the baseline check for oak-auth-external: {{mvn bundle:baseline}}

{noformat}$ mvn bundle:baseline
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Oak External Authentication Support 1.8-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-bundle-plugin:3.3.0:baseline (default-cli) @ oak-auth-external 
---
[INFO] Baseline Report - Generated by Apache Felix Maven Bundle Plugin on 
2017-05-31T09:40Z based on Bnd - see http://www.aqute.biz/Bnd/Bnd
[INFO] Comparing bundle oak-auth-external version 1.8-SNAPSHOT to version 1.7.0
[INFO] 
[INFO]   PACKAGE_NAME                                       DELTA      CUR_VER  
  BASE_VER   REC_VER    WARNINGS  
[INFO] = ================================================== ========== 
========== ========== ========== ==========
[INFO] < org.apache.jackrabbit.oak.spi.security.authentication.external minor   
   2.4.0      2.3.0      2.4.0      -         
[INFO]      < interface 
org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalGroup
[INFO]          + method isActive()
[INFO]              + return boolean
[INFO]      < interface 
org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentity
[INFO]          + method isActive()
[INFO]              + return boolean
[INFO]          + annotated aQute.bnd.annotation.ProviderType
[INFO]      < interface 
org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalUser
[INFO]          + method isActive()
[INFO]              + return boolean
[INFO]      - version 2.3.0
[INFO]      + version 2.4.0
[INFO] 
-----------------------------------------------------------------------------------------------------------
[INFO]   org.apache.jackrabbit.oak.spi.security.authentication.external.basic 
unchanged  1.3.0      1.3.0      1.3.0      -         
[INFO] 
-----------------------------------------------------------------------------------------------------------
[INFO] Baseline analysis complete, 0 error(s), 0 warning(s)
[INFO] ------------------------------------------------------------------------
{noformat}

> ExternalIdentity should have a method indicating if an identity is actually 
> active
> ----------------------------------------------------------------------------------
>
>                 Key: OAK-6144
>                 URL: https://issues.apache.org/jira/browse/OAK-6144
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: auth-external
>            Reporter: Manfred Baedke
>            Assignee: Manfred Baedke
>         Attachments: oak-6144-1.patch
>
>
> The interface ExternalIdentityProvider currently offers the method 
> getIdentity(ExternalIdentityRef) to resolve a reference to an external 
> Identity, but there is no way to tell if the external identity is considered 
> active by the identity provider. The ability to resolve the reference doesn't 
> mean that the resulting identity may actually be used for authentication or 
> authorization.
> If ExternaIIdentity isn't able to express this difference, it's hard to come 
> up with a sensible implemenation of e.g. 
> SynchronizationMBean#purgeOrphanedUsers(), because the ability to resolve a 
> reference to an external identity doesn't mean that the corresponding Oak 
> user is still valid.
> A new method ExternalIdentiy#isActive() would allow us to clearly define the 
> notion of an "orphaned user".



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to