My Oracle Support Banner

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

Last updated on MARCH 22, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.4 and later
Information in this document applies to any platform.

Symptoms

NOTE: In the images and/or the document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner. 

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 "My.Name" identified by xxxx;
grant connect to "My.Name";


CONNECT lbacsys/xxxxxx


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','"My.Name"','S::US,EUR,ASIA');


PL/SQL procedure successfully completed.

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

USER_NAME
-----------------------------------------------------------------------------
MY.NAME

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 "My.Name"/xxx
Connected.
SQL> show user;
USER is "My.Name"
SQL>
SQL> select SA_SESSION.SA_USER_NAME('FACILITY') from dual;

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

MY.NAME

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.