OLS Is Not Working Properly With Mixed Case User Names (Doc ID 1357707.1)

Last updated on SEPTEMBER 12, 2011

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.4 and later   [Release: 10.2 and later ]
Information in this document applies to any platform.

Symptoms

OLS is not handling correctly lower letters in usernames. Although an user can be created with mixed case names, OLS casts the name to an uppercase string:



connect / as sysdba

create user "John.Smith" identified by a;
grant connect to "John.Smith";


CONNECT lbacsys/lbacsys


EXECUTE
SA_SYSDBA.CREATE_POLICY('FACILITY','FACLAB','READ_CONTROL,CHECK_CONTROL,LABEL_DEFAULT,HIDE');



EXEC SA_COMPONENTS.CREATE_LEVEL('FACILITY',3000,'HS','HIGHLY_SENSITIVE');
EXEC SA_COMPONENTS.CREATE_LEVEL('FACILITY',2000,'S','SENSITIVE');
EXEC SA_COMPONENTS.CREATE_LEVEL('FACILITY',1000,'P','PUBLIC');


EXEC SA_COMPONENTS.CREATE_COMPARTMENT('FACILITY',100,'ED','Education');
EXEC SA_COMPONENTS.CREATE_COMPARTMENT('FACILITY',200,'FIN','Financial');
EXEC SA_COMPONENTS.CREATE_COMPARTMENT('FACILITY',300,'HR','Human Resources');

EXEC SA_COMPONENTS.CREATE_GROUP('FACILITY',100,'G','Global');
EXEC SA_COMPONENTS.CREATE_GROUP('FACILITY',11,'US','United States','G');
EXEC SA_COMPONENTS.CREATE_GROUP('FACILITY',12,'EUR','Europe','G');
EXEC SA_COMPONENTS.CREATE_GROUP('FACILITY',13,'ASIA','Asia','G');

EXEC SA_LABEL_ADMIN.CREATE_LABEL('FACILITY',1000,'P');
EXEC SA_LABEL_ADMIN.CREATE_LABEL('FACILITY',2000,'S');
EXEC SA_LABEL_ADMIN.CREATE_LABEL('FACILITY',2011,'S::US');
EXEC SA_LABEL_ADMIN.CREATE_LABEL('FACILITY',2013,'S::ASIA');
EXEC SA_LABEL_ADMIN.CREATE_LABEL('FACILITY',2213,'HS:FIN:ASIA');
EXEC SA_LABEL_ADMIN.CREATE_LABEL('FACILITY',2312,'S:HR:EUR');
EXEC SA_LABEL_ADMIN.CREATE_LABEL('FACILITY',3000,'HS');
EXEC SA_LABEL_ADMIN.CREATE_LABEL('FACILITY',3011,'HS::US');
EXEC SA_LABEL_ADMIN.CREATE_LABEL('FACILITY',3013,'HS::ASIA');


EXEC
SA_USER_ADMIN.SET_USER_LABELS('FACILITY','"John.Smith"','S::US,EUR,ASIA');


PL/SQL procedure successfully completed.

SQL>
SQL>
SQL>
SQL>
SQL> select user_name from dba_sa_users;

USER_NAME
-----------------------------------------------------------------------------
JOHN.SMITH

It seems that OLS is always casting the username to uppercase and this can be
seen when checking the "OLS username" with SA_SESSION.SA_USER_NAME:

SQL> connect "John.Smith"/a
Connected.
SQL> show user;
USER is "John.Smith"
SQL>
SQL> select SA_SESSION.SA_USER_NAME('FACILITY') from dual;

SA_SESSION.SA_USER_NAME('FACILITY')
------------------------------------------------------------------------------

JOHN.SMITH

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms