Database Security Products (MOSC)

MOSC Banner

Label Security - TO_DATA_LABEL allowing duplicate label strings

edited Sep 29, 2016 8:57AM in Database Security Products (MOSC) 5 commentsAnswered

We use TO_DATA_LABEL to [auto]generate labels and get the label tag back.  This function is called when users log in and pass in a predefined label string.  A couple of times, we ended up with duplicate labels, more accurately 2 label rows with the same label string ('BLAH_LEVEL:BLAH_COMPARTMENT:BLAH_GROUP'), but a different label tag (the number).  This causes a problem in other internal OLS calls where they get ORA-01422: exact fetch returns more than requested number of rows when they look for that specific label string and get more than 1 row back.

I think this happens when 2 users that have been assigned the same label string login at the exact same time.  There is no constraint on the LBACSYS.LBAC$LAB table to prevent this.  I can only think that both sessions' TO_DATA_LABEL calls start a check query to see if the string already exists, and then both do an insert at the same time.  The NLABEL value assigned to each row is unique, so that passes the constraint checks and both inserts succeed.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center