shindig-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Saputra <henry.sapu...@gmail.com>
Subject Re: Issues in uploading the oauth key
Date Tue, 23 Aug 2011 16:45:35 GMT
Then update the properties file to

shindig.signing.key-file=res://oauthkey.pem

Assuming oauthkey.pem is in WEB-INF/classes

- Henry

On Tue, Aug 23, 2011 at 9:12 AM, Henry Saputra <henry.saputra@gmail.com> wrote:
> Correction it should be under  webapps/<Shindig path>/WEB-INF/classes
>
> On Tue, Aug 23, 2011 at 8:54 AM, Henry Saputra <henry.saputra@gmail.com> wrote:
>> Try to put the file in the webapps/classes directory and set
>> shindig.signing.key-file=oauthkey.pem
>>
>> The code look for the key as Java resource file.
>>
>> - Henry
>>
>> On Tue, Aug 23, 2011 at 4:29 AM, Stefano Pogliani <stefano@poglianis.net> wrote:
>>> Hi
>>>
>>> I am using Tomcat 7.0.2 on Windows 7 64 bits
>>> I installed Shindig 2.0.0
>>>
>>> I am able to run the test on the following URL:
>>> http://localhost:8080/editor/
>>>
>>> I noticed that, on startup, Tomcat told me to create an OAUTH key.
>>> So I did the following :
>>>
>>> openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem -out
>>> testkey.pem -subj '/CN=mytestkey'
>>> openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM
>>>
>>> I edited the shindig.properties file that I found inside the
>>> "shindig-common-2.0.2.jar" archive and made the following changes:
>>>
>>> shindig.signing.key-name=mytestkey
>>> shindig.signing.key-file=/WEB-INF/oauthkey.pem
>>>
>>> and, then, I copied the oauthkey.pem file into the
>>> $apache-root\webapps\ROOT\WEB-INF directory
>>>
>>> Now, when I start Tomcat, I receive a series of errors starting with the
>>> following lines:
>>>
>>> INFO: Loading OAuth signing key from /WEB-INF/oauthkey.pem
>>> 23 août 2011 12:47:21
>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider
>>> loadDefaultKey
>>> WARNING: Couldn't load key file /WEB-INF/oauthkey.pem
>>> Throwable occurred: java.io.FileNotFoundException: \WEB-INF\oauthkey.pem
>>> (The system cannot find the path specified.)
>>>        at java.io.FileInputStream.<init>(FileInputStream.java:112)
>>>        at
>>> org.apache.shindig.common.util.ResourceLoader.open(ResourceLoader.java:49)
>>>        at
>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider.loadDefaultKey(OAuthModule.java:124)
>>>        at
>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider.<init>(OAuthModule.java:114)
>>>        at
>>> org.apache.shindig.gadgets.oauth.OAuthModule$OAuthStoreProvider$$FastClassByGuice$$a027b5d6.newInstance(<generated>)
>>>        at
>>> com.google.inject.internal.cglib.reflect.FastConstructor.newInstance(FastConstructor.java:40)
>>>        at
>>> com.google.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
>>>        at
>>> com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
>>>        at
>>> com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
>>>        at
>>> com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
>>>        at
>>> com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
>>>        at
>>> com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
>>>        at com.google.inject.Scopes$1$1.get(Scopes.java:54)
>>>        at
>>> com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
>>>        at com.google.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
>>>        at com.google.inject.InjectorBuilder$1.call(InjectorBuilder.java:194)
>>>        at
>>> com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:804)
>>>        at
>>> com.google.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:194)
>>>        at
>>> com.google.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:176)
>>>
>>>
>>> apparently, from the little I understand, the software reads the
>>> shindig.properties file, finds the location where to load the oauthkey.pem
>>> file but:
>>>
>>> 1. either the location in the properties file does NOT point to the physical
>>> location where I copied my key
>>> 2. or it does not recognize "/WEB-INF/" as something that it can access
>>>
>>>
>>> Any idea?
>>> thanks in advance for your help
>>>
>>> Best regards
>>> /stefano
>>>
>>
>

Mime
View raw message