-
1. Re: OData Error
tejones Oct 14, 2014 8:37 AM (in response to jjaideep2000)Hi Jaideep,
Make sure your user has the "odata" role.
OData Support - Teiid 8.9 (draft) - Project Documentation Editor
Thanks,
Ted
-
2. Re: OData Error
jjaideep2000 Oct 14, 2014 2:07 PM (in response to tejones)Hi Ted.
Configuration in the web.xml looks correct, but still getting the same error
Also, I am wondering, which user id and password, it is expecting? is it Teiid user id/password, I have the default one user=user. Or is it expecting the database userid/password?
If I try using user/user for login. I see this on the console:
11:05:49,647 WARN [org.teiid.SECURITY] (New I/O worker #7) null TEIID40011 Processing exception 'TEIID40042 Invalid Session 2f+E9FaYnbKa. Session may have already been terminated.' for session null.
org.teiid.client.security.InvalidSessionException thrown from org.teiid.services.SessionServiceImpl.getSessionInfo(SessionServiceImpl.java:365). Enable more detailed logging to see the entire stacktrace.
Web.xml:
<security-role>
<description>security role</description>
<role-name>odata</role-name>
</security-role>
<security-constraint>
<display-name>require valid user</display-name>
<web-resource-collection>
<web-resource-name>Teiid Rest Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>odata</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>localhost</realm-name>
</login-config>
-
3. Re: OData Error
tejones Oct 14, 2014 2:23 PM (in response to jjaideep2000)Hi Jaideep,
You need to add the "odata" role for "user" in {as7InstallLocation}/standalone/configuration/teiid-security-users.properties. By default, the user will be authenticated against Teiid's default security domain "teiid-security" and makes use of the security role odata.
Thanks,
Ted
-
4. Re: OData Error
jjaideep2000 Oct 14, 2014 3:41 PM (in response to tejones)
Hi Ted,I don't see teiid-security-users.properties and teiid-security-roles.properties files in standalone/configuration. I see application-roles.properties and application-users.properties files only. Do I have to create teiid-security-***.properties files manually?
Thanks,
-
5. Re: OData Error
tejones Oct 14, 2014 4:01 PM (in response to jjaideep2000)No Jaideep.. you don't need to create the property files. In older versions of Teiid, the property files were located in the Teiid module (org/jboss/teiid/main/conf). What version are you using?
Thanks,
Ted
-
-
7. Re: OData Error
tejones Oct 14, 2014 7:07 PM (in response to jjaideep2000)Ah.. it looks like those files have been removed. You can update "user" in the application-roles.properties file to add the "odata" role.
-
8. Re: OData Error
jjaideep2000 Oct 14, 2014 8:48 PM (in response to tejones)Ted,
I added application user using bin\add-user.bat and it did the trick. Now I am able to see the data using OData API.
Thanks very much for all your help.
Best,
Jaideep
-
9. Re: OData Error
tejones Oct 15, 2014 9:31 AM (in response to jjaideep2000)That's great Jaideep. Glad we could get you up and running with OData.