Can security be applied at the project level?

I am creating a number of projects. Each for a different geographical region. The client does not want users from one region (project) to be able to access/control information from another region (project).

This could easily be done if I could assign a security role to a project but I don’t see anywhere that let’s me do that.

Definitely! Make a few Authentication profiles and use the expert authentication query for them.

Assuming you are using a database driven authentication profile, go into the FactoryPMI gateway configuration page. Go to the authentication profiles. Click the edit icon for the one you want. At the bottom of the page, there is a section labeled ‘Query Configuration (expert)’.

You can set this up any way you want, but if you added a ‘location’ column (with an area called East Stack) to the user table, your query would look like:SELECT Username FROM USERS WHERE Username = '$username$' AND Password = '$password$' AND location = 'East Stack'
This will work for one project that is tied to the East Stack location. You cannot pass in the project name like you can the username and password, so you will need to set up another Auth. profile for each project that needs to use the location column. At least this way they all use the same table in the database.

Another approach would be to assign users a Security Role that represents their location. This is independent of your choice of authentication type) You would then write a “Startup Script” (in Global Event Scripts), that runs to check their permissions. You might log them off (same script module) if they aren’t allowed to run the project in that location. This scheme allows users to be members of any number of locations.

Sorry Robert, I’m running Hybrid and there is no ‘Query Configuration (expert)’.

Nathan: I will look at doing that. I was hoping I wouldn’t have to code it. :cry:

It isn’t a lot of coding. The script will probably look like:if "East Stack" in pass else:

I think you can useif not "East Stack" in I can’t check it at the moment.

Assigning a list of roles that are allowed to launch a project is a feature request that we are definately going to implement, but the timeframe is roughly 6mo.

Found a better way. (for Hybrid at least)

Create an Authentication Profile for each project. Cause, authentication is handled externally you don’t have to worry about keeping passwords in sync. And you would have to assign user to multiple roles anyway for those users that require it. This keeps things nice and simple.

(I know Robert, thats what you tried to tell me at first. Sometimes it takes awhile to sink in)

Glad that worked for you. Are you using the retargeting feature? It allows users to seamlessly link/jump to different FactoryPMI projects that can be hosted on other computers. The transition is seamless if their username/password matches on the new system, otherwise they are prompted to log on to the new system.

Yes I am using retargeting. That’s why external authentication will work so well.

In Ignition, projects as a whole can specify a list of roles that are required to even log-in in the first place.

That’s one I missed Carl. As that (FPMI) project hasn’t gone to production yet, I’ll have to try to convince the customer to upgrade to ignition.

Not a bad idea :slight_smile: