Hi ,
I followed your advice , this is the output from the JAAS console
JAAS Configuration Details:
Registered LoginModules
Realm : macs
jaas.PropertiesLoginModule
Flag : SUFFICIENT
Type : Configuration
Ranking : 0
Available LoginModules
Am I supposed to see my module registered in the available LoginModule too ?
This is my MANIFEST file:
Manifest-Version: 1.0
Bnd-LastModified: 1466061386408
Bundle-ManifestVersion: 2
Bundle-Name: jaas-impl
Bundle-SymbolicName: jaas-impl
Bundle-Version: 0.0.0.201606160716
Created-By: 1.8.0_92 (Oracle Corporation)
Export-Package: jaas;version="1.0.0";uses:="javax.secu
rity.auth,javax.security.auth.callback,javax.security.auth.login,java
x.security.auth.spi,org.apache.felix.jaas,org.osgi.framework"
Header: Jaas-ModuleClass=jaas.PropertiesLoginModule
Import-Package: javax.security.auth,javax.security.auth.callback,javax
.security.auth.login,javax.security.auth.spi,org.apache.felix.jaas;ve
rsion="[1.0,2)",org.osgi.framework;version="[1.8,2)",org.osgi.service
.log;version="[1.3,2)"
Provide-Capability: osgi.service;objectClass:List<String>="javax.secur
ity.auth.callback.CallbackHandler",osgi.service;objectClass:List<Stri
ng>="org.apache.felix.jaas.LoginModuleFactory"
Require-Capability: osgi.extender;filter:="(&(osgi.extender=osgi.compo
nent)(version>=1.3.0)(!(version>=2.0.0)))",osgi.service;filter:="(obj
ectClass=java.util.Optional)";effective:=active;resolution:=optional,
osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Service-Component: OSGI-INF/jaas.PropertiesLoginModule
Factory.xml,OSGI-INF/jaas.TaipanCallbackHandler.xml
Tool: Bnd-3.2.0.201605172007
I tried to look at the felix samples (jaas sample) but I can't find this
famous Header entry in the jar generated.
Regards
Jerome
Le 16/06/2016 à 08:34, Chetan Mehrotra a écrit :
> Hi Jerome,
>
> Do you have webconsole installed? If yes can you check whats shown in
> http://localhost:8080/system/console/status-jaas (Status -> JAAS)
>
> Looking at your details it appears that 'Jaas-ModuleClass' header is
> not found in any bundle listing that class. Can you confirm by
> checking the generated MANIFEST.MF of your bundle if bnd instruction
> is working i.e. required header is getting added
> Chetan Mehrotra
>
>
> On Wed, Jun 15, 2016 at 6:18 PM, deadbrain <[email protected]> wrote:
>> Hi all Felix gurus,
>>
>> I am using latest released bundles (5.4 distro and up to date
>> LogService, JAAS and others bundles).
>>
>> I wish to provide my own authentication/authorization system while using
>> the Felix JAAS support.
>>
>> I develop with BndTools on Eclipse Luna 4.4 and standard OSGi
>> annotations set (org.osgi...).
>>
>> I developed a small Gogo task to test my code and I am quickly stuck
>> with a LoginException wrapping an AssertionError thrown from
>> BundleLoginCreator (from Felix JAAS support classes) saying that No
>> bundle exists to create LoginModule with my custom class 's name.
>>
>> It seems (looking at the source code) that this class uses some metadata
>> stored in a map to identofy the LoginModule / bundle . Right , but it
>> seems that my bundle does not provide this metadata .
>>
>> Have you an idea about the why ?
>>
>> I registered a cfg file for the factory :
>> /taipan-jaas/load/org.apache.felix.jaas.Configuration.factory-macs-jaas.cfg
>>
>> I can see that everything seems ok in the Webconsole.
>>
>> I used bnd to add header metainformation Jaas-ModuleClass telling what
>> is the LoginModule to be used.
>>
>> My client code will pick up the Felix JAAS factory and custom
>> CallbackHandler then login through the logincontext. This portion of
>> code seems ok, my problems live with the metadata used by the
>> BundleLoginCreator.
>>
>>
>> Your help would be helpful
>>
>> Kind regards
>>
>> Jerome
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]