StrataFrame Forum

security data location?

http://forum.strataframe.net/Topic6091.aspx

By yh - 1/23/2007

I input some data (like users&roles&permissions) using the 'Security Editor' , Where did these data go?

I did not see these data in any of the SFS tables?  Please guide.

Also  how should I using these data in the application? Thank you.

Yong

By Trent L. Taylor - 1/23/2007

All data at design-time is stored in the StrataFrame database to which you have your design time settings pointed.  To deploy your Security into you application in the field, you have several options.  You can use the DDT (Database Deployment Toolkit) which will make short work of it or do it manually.

DDT Help
Deployment Data Packages -> Deployment Package Wizard

Security Help
Defining Security Within the Application -> Deploying Security Data

By yh - 1/23/2007

Thanks for prompt reply. Yes, I can see the the data in the database now.

 

Why does the below 'loResult' return value: failure?  Thank you.

 

 Dim loUserInfo As New SFSUsersBO      

 Dim loResult As MicroFour.StrataFrame.Security.Login.LoginResult

 loResult = MicroFour.StrataFrame.Security.Login.AuthenticateUser("rightUsername", "rightPassword", "rightDomain", loUserInfo)

By StrataFrame Team - 1/23/2007

Are the users contained within the SFS tables that were deployed to the database?  You cannot point the SecurityDataSourceKey to the StrataFrame database because the design-time database is not the exact same as the runtime database.  The users must be moved from the design-time database (StrataFrame) into your SFS tables in the database.  The Deployment Data Wizard within the DDT is designed to create the deployment data packages to do just that.
By yh - 1/23/2007

I use only 1 database : StrataFrame. The security data (user name, password ) is in the table :SFSUsers

I specify the connection string only in global.asax, Below code is the only code in   'Sub Application_Start'

DataLayer.DataSources.Add(New SqlDataSourceItem("", "Database=StrataFrame;Server=testServer;Integrated Security=SSPI;"))
SecurityBasics.IsWebEnvironment = True

Thanks again.
        

By StrataFrame Team - 1/23/2007

Do you not also have a connection for you own data... the StrataFrame database is the design-time SF database, right?

The way you have it configured will work up to a point... since the StrataFrame database stores more than one security "project," the way you have it configured will work until you have two projects with the same user... since the project is not used at runtime, the security module has no way of knowing which user to retrieve from the database, so it just grabs the first one.

By yh - 1/25/2007

Trent L. Taylor,

I use the 'Security Editor' to input the security data (User name/role/permission...), all the data go to the design time settings database: StrataFrame

How to change the design time settings? Or say can the ‘Security Editor’  store the security data into some other database?

 

>>All data at design-time is stored in the StrataFrame database to which you have your design time settings pointed.  To deploy your >>Security into you application in the field, you have several options.  You can use the DDT (Database Deployment Toolkit) which will make >>short work of it or do it manually.

By Trent L. Taylor - 1/25/2007

First, you have to export the security data to your database.  Let's assume your database is named MyDatabase.  If you are using the Database Deployment Toolkit, use the deployment package wizard to bring in the security structures and data.

Look at the help topic in the DDT Help for more details: Deployment Data Packages -> Deployment Package Wizard

Once you have created the Deployment Data Packages, you MUST deploy the DDT profile to your SQL Server before the changes and security data are deployed to the "MyDatabase" database in your server.  To deploy, click the Deploy To Server button within the DDT.

Be sure to re-create the packages when prompted.

Once this has been completed and you have deployed the data and structures to your server.  THEN you can access these settings within your application.  If you are using "MyDatabase" or your application database to house the security tables and data, then make sure to set the following value in the InitApplication of your AppMain.vb or Program.cs file:

SecurityBasics.SecurityDataSourceKey = ""

If you are specifying a different data source connection and database for your security to be housed, then let me know and I will post some different code.

At this point you should be able to run your application and properly access the security data.

By yh - 2/9/2007

I don't have Database Deployment Toolkit.

But it seems there is a way to change the 'Design time setting'. And changing the design setting could mess up the strata frame tools.

By StrataFrame Team - 2/13/2007

Nope, the design-time editor uses the StrataFrame database.  The data for your project then needs to be moved to your runtime database to be used by your application.
By Guillermo Vilas - 1/15/2008

I got here searching the posts for a way to export the security data to my production database, It seems that the Security Framework and DDT all tied up since there is no easy way to get the Permissions data settled at design time (StrataFrame tables). But even using DDT it appears to be a little bit complicated to get that data.



I've been reading the documentation and the post but I've the feeling I'm missing something in the way I can't find a way to get the Security Data populated to my production server.



Please Ben or Trent can you show me the way?
By Ivan George Borges - 1/15/2008

Hi Guillermo.

Not Ben nor Trent here, but I might be able to help, if what I will show you is not known by you already.

First, you will use the Security Editor from the StrataFrame menu at design time and create your Permissions, Restrictions, pre-built Roles, Users if necessary. These all will go to the SF Database.

Now, in your DDT project, you will import the Security tables' structures, as you can see in the figure bellow.

After that, click on Deployment Data and on the toolbar, Create new packages using the Deployment Package Wizard. Have a look at the following picture.

Following the wizard that will open, choose the Role Based Security Data and that will import all your data to be deployed.

That should be it. Your package will create your security structures and deploy the data on your production server.

Hope I got that right to you.

By Guillermo Vilas - 1/15/2008

Hello Ivan

As I see in picture you sent, you are creating a New Deployment Package for each of the SF Security Tables? Is that correct?
By Ivan George Borges - 1/15/2008

Hey Bill.

Nope, once you go through the wizard, it will create an entry for each of your Security tables, you don't need to do them individualy.

By Ivan George Borges - 1/15/2008

Hey Guillermo.

Better now with your correct name, right? Blush

By Guillermo Vilas - 1/15/2008

Now I finally got it!!!!

But I must say that is not very clear from the documentation, I will post the sceenshots of every step I took to reproduce what I did to get it running.



Thanks again Ivan
By Guillermo Vilas - 1/15/2008

He he

No problem with that.

Bill = William - Engilsh

Guille = Guillermo = Spanish



BigGrin
By Ivan George Borges - 1/15/2008

Glad you got it working, Guille. Cool