[JBoss JIRA] (TEIID-2695) Unable to use CASE statement in Select
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-2695?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-2695:
------------------------------------
I think this is not good, because you can no longer use functional based permissions in view's to control behavior.
> Unable to use CASE statement in Select
> --------------------------------------
>
> Key: TEIID-2695
> URL: https://issues.jboss.org/browse/TEIID-2695
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4.1
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Attachments: portfolio-vdb.xml
>
>
> Trying to add a <mask> of:
> <permission>
> <resource-name>Stocks.StockPrices.Price</resource-name>
> <mask>CASE WHEN hasRole('prices') THEN Price END</mask>
> </permission>
> even tried using "= true" just to see
> but it it always returns null for Prices.
> To test it, I logged in as 'user' using CommandLog vdb and issued:
> Select VDB, CASE WHEN hasRole('prices') THEN 'Y' Else 'N' END as V from TEIID_COMMANDLOG
> and 'N' was always returned for column V.
> teiid roles file:
> # A roles.properties file for use with the UsersRolesLoginModule
> # username=role1,role2
> portfolio=superuser
> viewonly=readonly
> user=user,prices
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (TEIID-2695) Unable to use CASE statement in Select
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-2695?page=com.atlassian.jira.plugin... ]
Van Halbert updated TEIID-2695:
-------------------------------
Comment: was deleted
(was: What it sounds like is Teiid is basing the hasRole() on what roles are defined in the vdb.xml and is also mapped to the user, not what is defined in the roles properties file,)
> Unable to use CASE statement in Select
> --------------------------------------
>
> Key: TEIID-2695
> URL: https://issues.jboss.org/browse/TEIID-2695
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4.1
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Attachments: portfolio-vdb.xml
>
>
> Trying to add a <mask> of:
> <permission>
> <resource-name>Stocks.StockPrices.Price</resource-name>
> <mask>CASE WHEN hasRole('prices') THEN Price END</mask>
> </permission>
> even tried using "= true" just to see
> but it it always returns null for Prices.
> To test it, I logged in as 'user' using CommandLog vdb and issued:
> Select VDB, CASE WHEN hasRole('prices') THEN 'Y' Else 'N' END as V from TEIID_COMMANDLOG
> and 'N' was always returned for column V.
> teiid roles file:
> # A roles.properties file for use with the UsersRolesLoginModule
> # username=role1,role2
> portfolio=superuser
> viewonly=readonly
> user=user,prices
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (TEIID-2695) Unable to use CASE statement in Select
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-2695?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-2695:
------------------------------------
What it sounds like is Teiid is basing the hasRole() on what roles are defined in the vdb.xml and is also mapped to the user, not what is defined in the roles properties file,
> Unable to use CASE statement in Select
> --------------------------------------
>
> Key: TEIID-2695
> URL: https://issues.jboss.org/browse/TEIID-2695
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4.1
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Attachments: portfolio-vdb.xml
>
>
> Trying to add a <mask> of:
> <permission>
> <resource-name>Stocks.StockPrices.Price</resource-name>
> <mask>CASE WHEN hasRole('prices') THEN Price END</mask>
> </permission>
> even tried using "= true" just to see
> but it it always returns null for Prices.
> To test it, I logged in as 'user' using CommandLog vdb and issued:
> Select VDB, CASE WHEN hasRole('prices') THEN 'Y' Else 'N' END as V from TEIID_COMMANDLOG
> and 'N' was always returned for column V.
> teiid roles file:
> # A roles.properties file for use with the UsersRolesLoginModule
> # username=role1,role2
> portfolio=superuser
> viewonly=readonly
> user=user,prices
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (TEIID-2695) Unable to use CASE statement in Select
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-2695?page=com.atlassian.jira.plugin... ]
Van Halbert edited comment on TEIID-2695 at 10/11/13 10:12 AM:
---------------------------------------------------------------
Hm, I thought the hasRole('role') call was the way to determine if this current user has this role assigned to them (in other words, a member of the group).
was (Author: van.halbert):
Hm, I thought the hasRole('role') call was the way to determine if this current user has this role assigned to them.
> Unable to use CASE statement in Select
> --------------------------------------
>
> Key: TEIID-2695
> URL: https://issues.jboss.org/browse/TEIID-2695
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4.1
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Attachments: portfolio-vdb.xml
>
>
> Trying to add a <mask> of:
> <permission>
> <resource-name>Stocks.StockPrices.Price</resource-name>
> <mask>CASE WHEN hasRole('prices') THEN Price END</mask>
> </permission>
> even tried using "= true" just to see
> but it it always returns null for Prices.
> To test it, I logged in as 'user' using CommandLog vdb and issued:
> Select VDB, CASE WHEN hasRole('prices') THEN 'Y' Else 'N' END as V from TEIID_COMMANDLOG
> and 'N' was always returned for column V.
> teiid roles file:
> # A roles.properties file for use with the UsersRolesLoginModule
> # username=role1,role2
> portfolio=superuser
> viewonly=readonly
> user=user,prices
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (TEIID-2695) Unable to use CASE statement in Select
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-2695?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-2695:
------------------------------------
Hm, I thought the hasRole('role') call was the way to determine if this current user has this role assigned to them.
> Unable to use CASE statement in Select
> --------------------------------------
>
> Key: TEIID-2695
> URL: https://issues.jboss.org/browse/TEIID-2695
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4.1
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Attachments: portfolio-vdb.xml
>
>
> Trying to add a <mask> of:
> <permission>
> <resource-name>Stocks.StockPrices.Price</resource-name>
> <mask>CASE WHEN hasRole('prices') THEN Price END</mask>
> </permission>
> even tried using "= true" just to see
> but it it always returns null for Prices.
> To test it, I logged in as 'user' using CommandLog vdb and issued:
> Select VDB, CASE WHEN hasRole('prices') THEN 'Y' Else 'N' END as V from TEIID_COMMANDLOG
> and 'N' was always returned for column V.
> teiid roles file:
> # A roles.properties file for use with the UsersRolesLoginModule
> # username=role1,role2
> portfolio=superuser
> viewonly=readonly
> user=user,prices
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (TEIID-2695) Unable to use CASE statement in Select
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2695?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-2695:
---------------------------------------
So the confusion here is that what UsersRolesLoginModule terms as roles are actually groups to JAAS. Then whenever Teiid refers to roles it is the Teiid role names as defined in the VDB xml (this means that even if the source system changes the vdb can remain consistent). So user is in the groups user and prices, and has the Teiid ReadOnly role since that is available to any authenticated. Using hasRole('prices') is working as expected as there is no Teiid role by that name and will return false.
> Unable to use CASE statement in Select
> --------------------------------------
>
> Key: TEIID-2695
> URL: https://issues.jboss.org/browse/TEIID-2695
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4.1
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Attachments: portfolio-vdb.xml
>
>
> Trying to add a <mask> of:
> <permission>
> <resource-name>Stocks.StockPrices.Price</resource-name>
> <mask>CASE WHEN hasRole('prices') THEN Price END</mask>
> </permission>
> even tried using "= true" just to see
> but it it always returns null for Prices.
> To test it, I logged in as 'user' using CommandLog vdb and issued:
> Select VDB, CASE WHEN hasRole('prices') THEN 'Y' Else 'N' END as V from TEIID_COMMANDLOG
> and 'N' was always returned for column V.
> teiid roles file:
> # A roles.properties file for use with the UsersRolesLoginModule
> # username=role1,role2
> portfolio=superuser
> viewonly=readonly
> user=user,prices
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (TEIID-2695) Unable to use CASE statement in Select
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-2695?page=com.atlassian.jira.plugin... ]
Van Halbert updated TEIID-2695:
-------------------------------
Attachment: portfolio-vdb.xml
This is essentially the vdb from dynamicvdb-dataroles quick start, with a few additions for new view that I was trying to use the condition in the mask.
> Unable to use CASE statement in Select
> --------------------------------------
>
> Key: TEIID-2695
> URL: https://issues.jboss.org/browse/TEIID-2695
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4.1
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Attachments: portfolio-vdb.xml
>
>
> Trying to add a <mask> of:
> <permission>
> <resource-name>Stocks.StockPrices.Price</resource-name>
> <mask>CASE WHEN hasRole('prices') THEN Price END</mask>
> </permission>
> even tried using "= true" just to see
> but it it always returns null for Prices.
> To test it, I logged in as 'user' using CommandLog vdb and issued:
> Select VDB, CASE WHEN hasRole('prices') THEN 'Y' Else 'N' END as V from TEIID_COMMANDLOG
> and 'N' was always returned for column V.
> teiid roles file:
> # A roles.properties file for use with the UsersRolesLoginModule
> # username=role1,role2
> portfolio=superuser
> viewonly=readonly
> user=user,prices
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (TEIID-2695) Unable to use CASE statement in Select
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2695?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-2695:
---------------------------------------
And what about the vdb.xml with the role mappings?
> Unable to use CASE statement in Select
> --------------------------------------
>
> Key: TEIID-2695
> URL: https://issues.jboss.org/browse/TEIID-2695
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4.1
> Reporter: Van Halbert
> Assignee: Steven Hawkins
>
> Trying to add a <mask> of:
> <permission>
> <resource-name>Stocks.StockPrices.Price</resource-name>
> <mask>CASE WHEN hasRole('prices') THEN Price END</mask>
> </permission>
> even tried using "= true" just to see
> but it it always returns null for Prices.
> To test it, I logged in as 'user' using CommandLog vdb and issued:
> Select VDB, CASE WHEN hasRole('prices') THEN 'Y' Else 'N' END as V from TEIID_COMMANDLOG
> and 'N' was always returned for column V.
> teiid roles file:
> # A roles.properties file for use with the UsersRolesLoginModule
> # username=role1,role2
> portfolio=superuser
> viewonly=readonly
> user=user,prices
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (TEIID-2695) Unable to use CASE statement in Select
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-2695?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-2695:
------------------------------------
users:
# A users.properties file for use with the UsersRolesLoginModule
# username=password
user=user
portfolio=portfolio
viewonly=viewonly
roles:
# A roles.properties file for use with the UsersRolesLoginModule
# username=role1,role2
portfolio=superuser
viewonly=readonly
user=user,prices
> Unable to use CASE statement in Select
> --------------------------------------
>
> Key: TEIID-2695
> URL: https://issues.jboss.org/browse/TEIID-2695
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4.1
> Reporter: Van Halbert
> Assignee: Steven Hawkins
>
> Trying to add a <mask> of:
> <permission>
> <resource-name>Stocks.StockPrices.Price</resource-name>
> <mask>CASE WHEN hasRole('prices') THEN Price END</mask>
> </permission>
> even tried using "= true" just to see
> but it it always returns null for Prices.
> To test it, I logged in as 'user' using CommandLog vdb and issued:
> Select VDB, CASE WHEN hasRole('prices') THEN 'Y' Else 'N' END as V from TEIID_COMMANDLOG
> and 'N' was always returned for column V.
> teiid roles file:
> # A roles.properties file for use with the UsersRolesLoginModule
> # username=role1,role2
> portfolio=superuser
> viewonly=readonly
> user=user,prices
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (TEIID-2695) Unable to use CASE statement in Select
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2695?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-2695:
---------------------------------------
So then what do your role and user files look like precisely?
> Unable to use CASE statement in Select
> --------------------------------------
>
> Key: TEIID-2695
> URL: https://issues.jboss.org/browse/TEIID-2695
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4.1
> Reporter: Van Halbert
> Assignee: Steven Hawkins
>
> Trying to add a <mask> of:
> <permission>
> <resource-name>Stocks.StockPrices.Price</resource-name>
> <mask>CASE WHEN hasRole('prices') THEN Price END</mask>
> </permission>
> even tried using "= true" just to see
> but it it always returns null for Prices.
> To test it, I logged in as 'user' using CommandLog vdb and issued:
> Select VDB, CASE WHEN hasRole('prices') THEN 'Y' Else 'N' END as V from TEIID_COMMANDLOG
> and 'N' was always returned for column V.
> teiid roles file:
> # A roles.properties file for use with the UsersRolesLoginModule
> # username=role1,role2
> portfolio=superuser
> viewonly=readonly
> user=user,prices
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months