Hi,
I am trying to configure commons crypto in the Sling Starter and I have
a very puzzling problem.
One of the three factory configs defined in the feature model file does
not bind to a component. I see no differences between the config
declaration or the components themselves.
Here's what I'm trying to do:
1. New feature file
$ cat src/main/features/crypto.json
{
"bundles": [
{
"id": "org.apache.sling:org.apache.sling.commons.crypto:1.1.0",
"start-order": 20
},
{
"id":
"org.apache.servicemix.bundles:org.apache.servicemix.bundles.jasypt:1.9.3_1",
"start-order": 20
}
],
"configurations": {
"org.apache.sling.commons.crypto.internal.EnvironmentVariablePasswordProvider~oauth":
{
"name": "DUMMY_PASSWORD"
},
"org.apache.sling.commons.crypto.jasypt.internal.JasyptRandomIvGeneratorRegistrar~oauth":
{
"algorithm": "SHA1PRNG"
},
"org.apache.sling.commons.crypto.jasypt.internal.JasyptStandardPBEStringCryptoService~oauth":
{
"names": [
"sling-oauth"
],
"algorithm": "PBEWITHHMACSHA512ANDAES_256"
}
}
}
2. Build and launch the starter
$ mvn clean package && rm -rf launcher
$ export DUMMY_PASSWORD=password
$ target/dependency/org.apache.sling.feature.launcher/bin/launcher -f
target/slingfeature-tmp/feature-oak_tar.json
When I go to http://localhost:8080/system/console/configMgr I see that
the password provider and IV generator factory configs are properly
bound to components but the crypto service one did not.
In the configuration status I see
PID =
org.apache.sling.commons.crypto.jasypt.internal.JasyptStandardPBEStringCryptoService~oauth
Factory PID =
org.apache.sling.commons.crypto.jasypt.internal.JasyptStandardPBEStringCryptoService
algorithm = PBEWITHHMACSHA512ANDAES_256
names = [sling-oauth]
and this looks right to me.
If I create the configuration using the web console UI or using the
Sling testing clients this works just fine.
I have no idea why this is not bound, any suggestions are welcome.
Thanks,
Robert