Wer stand schon einmal vor der Aufgabe einen Oracle BI – Server Enterprise Edition mit einem alternativem Provider zu verheiraten. Ich hatte die letzten Tage diese wundervolle Aufgabe. Alles ganz einfach, wenn man sich die Oracle Dokumentation anschaut.
Da wird eine Datasource erstellt. Diese geht auf die Datenbank in der die Tabellen liegen. Dann erstellt man sich einen Authentication Provider, verindet den mit der Datasource und erstellt ein paar Adapter.
Soweit zur Theorie. Wie schaut es nun in der Praxis aus.
Ja eigentlich geht das alles so, aber in der Dokumentation steht das natürlich nicht ganz so einfach, da gibt es viele Querverweise. Da gibt es Hinweise, die komplett überflüssig sind und da gibt es Nebensätze, die Lebensnotwendig sind. Also erst einmal der Reihe nach:
Wir erstellen uns erst einmal die Tabellen oder am besten ein paar Views mit denen man dann auf die Notwendigen Informationen wie User Name, Password sowie Berechtigungen zugreifen kann. Sehr anschaulich steht das in dem Oracle OBIEE Security Guide im Kapitel 3.4 beschrieben. (Version 11.1.1.1.7).
Mit dieser Struktur hat man den sehr großen Vorteil, das man zum Schluss die Adapter nicht anpassen muss.
Also erstelle ich mir diese Struktur als Views.
Dann wird die Datasource erstellt: Auch hier kann man sehr gut das Beispiel aus dem Dokument übernehmen. Einzutragen sind:
Name – For example, enter: UserGroupDS
JNDI Name – For example, enter: jdbc/UserGroupDS
Database Type – For example, select: Oracle
Select a database driver from the Database Driver drop down list.
Database Name – For example, enter: ora11g
Host Name – For example, enter: mymachine.example.com
Database User Name
Password/Confirm Password
Dann bitte auf die Targets (Admin Server und alle anderen verteilen)
So jetzt haben wir die Datasource, als nächstes muss der SQL Authenticator erstellt werden. Wenn ich auf Tabellen Ebene mit Tabellen arbeite, kann ich über den SQL Authenticator auch in diese Tabellen schreiben, wenn ich mit Views arbeite, sollte ich den ReadOnlySQL Authenticator nutzen. Dann muss allerdings die Verwaltung der Benutzer mit Ihren Rollen extern erfolgen. Beides geht.
im Security Realm erstelle ich mir meinen Provider (das kann man auch gut mit WLST Skripten). Auswahl Provider, dort auf NEW und folgende Eingaben machen.
Name: Enter a name for the authentication provider. For example, UserGroupDBAuthenticator.
Type: Select ReadOnlySQLAuthenticator from the list.
OK drücken und anschließend weiter bearbeiten. Es fehlen noch ein paar Informationen.
Der Datasource Name muss eingetragen werden hier : UserGroupDS
und je nachdem wie man seine Struktur aufgebaut hat, muss man auch die einzelnen Bereiche anpassen.
Was man aller wahrscheinlichkeit nach zum Schluss anpassen muss ist die GET PASSWORD Funktion.
Query SQL Notes
SQL Get Users Password (used to authenticate)
SELECT U_PASSWORD FROM USERS WHERE U_NAME = ?
The SQL statement used to look up a user’s password. The SQL statement requires a single parameter for the username and must return a resultSet containing at most a single record containing the password.
SQL User Exists
SELECT U_NAME FROM USERS WHERE U_NAME = ?
The SQL statement used to look up a user. The SQL statement requires a single parameter for the username and must return a resultSet containing at most a single record containing the user.
SQL List Users
SELECT U_NAME FROM USERS WHERE U_NAME LIKE ?
The SQL statement used to retrieve users that match a particular wildcard search. The SQL statement requires a single parameter for the usernames and returns a resultSet containing matching usernames.
SQL List Groups
SELECT G_NAME FROM GROUPS WHERE G_NAME LIKE ?
The SQL statement used to retrieve group names that match a wildcard. The SQL statement requires a single parameter for the group name and returns a resultSet containing matching groups.
SQL Group Exists
SELECT G_NAME FROM GROUPS WHERE G_NAME = ?
The SQL statement used to look up a group. The SQL statement requires a single parameter for the group name and must return a resultSet containing at most a single record containing the group.
SQL Is Member
SELECT G_MEMBER FROM GROUPMEMBERS WHERE G_NAME=? AND G_MEMBER LIKE ?
The SQL statement used to look up members of a group. The SQL statement requires two parameters: a group name and a member or group name. It must return a resultSet.
SQL List Member Groups
SELECT G_NAME FROM GROUPMEMBERS WHERE G_MEMBER = ?
The SQL statement used to look up the groups a user or group is a member of. The SQL statement requires a single parameter for the username or group name and returns a resultSet containing the names of the groups that matched.
SQL Get User Description (if description supported enabled)
SELECT U_DESCRIPTION FROM USERS WHERE U_NAME = ?
The SQL statement used to retrieve the description of a specific user. The SQL statement requires a single parameter for the username and must return a resultSet containing at most a single record containing the user description.
SQL Get Group Description (if description supported enabled)
SELECT G_DESCRIPTION FROM GROUPS WHERE G_NAME = ?
The SQL statement used to retrieve the description of a group. It is valid only if Descriptions Supported is enabled. The SQL statement requires a single parameter for the group name and must return a resultSet containing at most a single record containing the group description.
Bitte darauf achten, das die Übergabe des Passwortes sauber erfolgt: Plain oder verschlüsselt. Ich habe heute verschlüsselte Passwörter gehabt, habe die dann aber über eine Funktion entschlüsselt und dieses als Passwort in dem Provider genutzt. Leider habe ich nicht herausgefunden, mit welchem Algorythmus Oracle im Weblogic Umfeld etwas verschlüsselt und hashed.
Seite 2 folg….
Diskussionen
Es gibt noch keine Kommentare.