If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Create Groups and Roles under Java CAP Namespace

Started by gauravd20, 01 Aug 2008 01:19:07 AM

Previous topic - Next topic

gauravd20

Hi, I have implemented a Java CAP for cognos authentication by creating a namespace "Sample1". After authentication, i am looking on adding groups and roles in my custom namespace.
Have anyone tried the sample code provided under sdk samples??
It doesn't looks to be working for me.....
Please let me know how to create/add groups to custom namespace.

platipuss

Did you have any luck finding the answer to this question?

lindero

IMHO, you only can create groups and roles within the Cognos namespace via SDK. Imagine it wouldn't be an CAP but an LDAP. You are not able to create groups and roles within this authentication provider through the SDK as well.

What kind of authentication provider do you use for the CAP connection?

gauravd20

I am using Custom Java Provider as my namespace type.

lindero

sorry, which kind of source do you want to connect? Is it a database like MSSQL Server or a Teradata, or a flat file?

jramos

This question hasn't been answered yet, but hopefully somebody out there knows what to do.

I am also trying to attach roles to the account within the CAP visa but do not see the roles once I am logged in Cognos.

Do I have to specify the "Cognos" namespace instead of the CAP namespace when doing this?

Please help me understand how to achieve this.

Thank you.

platipuss

You provide groups and roles for the CAP view the
public IQueryResult search(IVisa theVisa, IQuery theQuery) function in your implemented NamespaceAuthenticationProvider2 class. Depending on how you satisfy the query your return a QueryResult.
So

QueryResult result = new QueryResult();
result.addObject(new Account('searchpath'));
result.addObject(new Role('searchpath'));
result.addObject(new Group('searchpath'));
return result;

So you can store groups in roles in tables and create them on the fly for each request. Just parse the cognos query into your own sql query and create the groups and roles on the fly to fill in result object.

the structure of our tables is

Entity_Table
entity_id*
name
is_user
is_group
is_role

Entity_mapping_table
child_id*
parent_id*

The mapping table just provide a way to have en infinite parent child tree. I will not post the code to do this but should be enough to get you started.

- Plat