2
Well folks, I don’t know if the title of my question is quite correct, if not, someone please edit. I’ll explain my problem.
I developed a tool that checks conflicts between access control policies in Software as a course completion work. For example, it checks whether the software has two policies that cannot be executed by the user at the same time, such as the two policies:
-> You are allowed to open a form.
-> It is forbidden for the user to open a form.
With this my tool compares the Java objects called Politica, which has the second structure:
Policy(type, organization, user, action, object, dateInicio, dataFim).
But I look for these policies in databases, such as my university, which is DB2. What I need to do and I have no idea how to do is:
-> How to connect to the database and get its structure.
-> After getting your structure, define which columns in the database, refer to the attributes of my Policy object?
If a table has the following structure:
ID - Type - Application - Action - Expiration date - Insertion date - Unit
How to make a match and say that: Type = Type, Application = Object, Action = Action, Validity Date = End Date and so on...
And get a query of this? And how to do this even if the tables are different, there are Joins?
Summarizing and trying to explain again: How to make any database that has policies return a Query with objects equal to my Policy object.
I need a north to know where it goes and if it is possible to do. Thank you very much.
Does this search and structure check need to be automated? I think it would add too much to the complexity of your program.
– user28595
I deleted the other comment because I read it wrong. Of the structure not necessarily, for example, if I looked in the database, we identified which fields were equated, and only informed in the program I think would be of great value. In text form, I don’t know... Because what I want to do is to exempt.
– João Neto