Hi All,

Can i get the source code location for wso2 api manager.


I have created a tenant xyz.com and a user [email protected].

To get the access token i am passing the following
 username:  [email protected]
 password: password.


I have also created a Customhandler in the api manager which will add a
tenantdomain in the header from the url by splitting the url
https://10.104.204.110:8243/t/xyz.com/sdp/v1/groups
and set the domain as xyz.com which will be used during authentication as
we are appening the tenantdomain to identify the user of that domain like
below.

username: [email protected]
password: password.

Its working fine but once i got the token during validation of token i am
getting as null instead of token in x-jwt-token.

The error in the console is as follows.



[2016-01-12 09:21:54,850]  INFO - APIKeyValidator Token
90e0516d4c3b5e8b825746aef1a19 expired.
[2016-01-12 09:21:54,851]  WARN - APIAuthenticationHandler API
authentication failure due to Invalid Credentials
[2016-01-12 09:22:02,476]  INFO - PermissionUpdater Permission cache
updated for tenant -1234
[2016-01-12 09:22:02,490]  INFO - CarbonAuthenticationUtil
'[email protected] [-1234]' logged in at [2016-01-12 09:22:02,490+0530]
[2016-01-12 09:22:02,567]  INFO - CarbonAuthenticationUtil
'[email protected] [-1234]' logged in at [2016-01-12 09:22:02,567+0530]
[2016-01-12 09:22:02,622]  INFO - PermissionUpdater Permission cache
updated for tenant -1234
[2016-01-12 09:22:02,633]  INFO - CarbonAuthenticationUtil
'[email protected] [-1234]' logged in at [2016-01-12 09:22:02,633+0530]
[2016-01-12 09:22:11,443] ERROR - KeyStoreManager Error when retrieving the
system governance registry
org.wso2.carbon.registry.core.exceptions.RegistryException: Failed to
obtain the user realm for tenant: -1.
        at
org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:304)
        at
org.wso2.carbon.registry.core.session.UserRegistry.access$100(UserRegistry.java:61)
        at
org.wso2.carbon.registry.core.session.UserRegistry$2.run(UserRegistry.java:249)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:246)
        at
org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:225)
        at
org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:427)
        at
org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getSystemRegistry(EmbeddedRegistryService.java:292)
        at
org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getGovernanceSystemRegistry(EmbeddedRegistryService.java:517)
        at
org.wso2.carbon.core.util.KeyStoreManager.<init>(KeyStoreManager.java:77)
        at
org.wso2.carbon.core.util.KeyStoreManager.getInstance(KeyStoreManager.java:112)
        at
org.wso2.carbon.core.util.KeyStoreManager.getInstance(KeyStoreManager.java:102)
        at
org.wso2.carbon.apimgt.impl.token.AbstractJWTGenerator.addCertToHeader(AbstractJWTGenerator.java:325)
        at
org.wso2.carbon.apimgt.impl.token.AbstractJWTGenerator.buildHeader(AbstractJWTGenerator.java:178)
        at
org.wso2.carbon.apimgt.impl.token.AbstractJWTGenerator.generateToken(AbstractJWTGenerator.java:131)
        at
org.wso2.carbon.apimgt.keymgt.handlers.AbstractKeyValidationHandler.generateConsumerToken(AbstractKeyValidationHandler.java:146)
        at
org.wso2.carbon.apimgt.keymgt.service.APIKeyValidationService.validateKey(APIKeyValidationService.java:169)
        at
org.wso2.carbon.apimgt.keymgt.service.thrift.APIKeyValidationServiceImpl.validateKey(APIKeyValidationServiceImpl.java:131)
        at
org.wso2.carbon.apimgt.impl.generated.thrift.APIKeyValidationService$Processor$validateKey.getResult(APIKeyValidationService.java:278)
        at
org.wso2.carbon.apimgt.impl.generated.thrift.APIKeyValidationService$Processor$validateKey.getResult(APIKeyValidationService.java:266)
        at
org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
        at
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:176)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
[2016-01-12 09:22:11,445] ERROR - AbstractKeyValidationHandler Error
occurred while generating JWT.
org.wso2.carbon.apimgt.api.APIManagementException: Error in obtaining
tenant's keystore
        at
org.wso2.carbon.apimgt.impl.token.AbstractJWTGenerator.addCertToHeader(AbstractJWTGenerator.java:386)
        at
org.wso2.carbon.apimgt.impl.token.AbstractJWTGenerator.buildHeader(AbstractJWTGenerator.java:178)
        at
org.wso2.carbon.apimgt.impl.token.AbstractJWTGenerator.generateToken(AbstractJWTGenerator.java:131)
        at
org.wso2.carbon.apimgt.keymgt.handlers.AbstractKeyValidationHandler.generateConsumerToken(AbstractKeyValidationHandler.java:146)
        at
org.wso2.carbon.apimgt.keymgt.service.APIKeyValidationService.validateKey(APIKeyValidationService.java:169)
        at
org.wso2.carbon.apimgt.keymgt.service.thrift.APIKeyValidationServiceImpl.validateKey(APIKeyValidationServiceImpl.java:131)
        at
org.wso2.carbon.apimgt.impl.generated.thrift.APIKeyValidationService$Processor$validateKey.getResult(APIKeyValidationService.java:278)
        at
org.wso2.carbon.apimgt.impl.generated.thrift.APIKeyValidationService$Processor$validateKey.getResult(APIKeyValidationService.java:266)
        at
org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
        at
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:176)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)

























-- 
* Regards*
* Pramod Thakur*
* 9980422825*
* Thank you.*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to