Generic OAM profiles on IBM i
Object authority manager (OAM) generic profiles enable you to set the authority a user has to many objects at once, rather than having to issue separate GRTMQMAUT commands against each individual object when it is created. Using generic profiles in the GRTMQMAUT command enables you to set a generic authority for all future objects created that fit that profile.
Using wildcard characters
What makes a profile generic is the use of special characters (wildcard characters) in the profile name. For example, the question mark (?) wildcard character matches any single character in a name. So, if you specify ABC.?EF
, the authorization you give to that profile applies to any objects created with the names ABC.DEF
, ABC.CEF
, ABC.BEF
, and so on.
- ?
- Use the question mark (?) instead of any single character. For example,
AB.?D
would apply to the objectsAB.CD
,AB.ED
, andAB.FD
. - *
- Use the asterisk (*) as:
- A qualifier in a profile name to match any one qualifier in an object name. A qualifier is the part of an object name delimited by a period. For example, in
ABC.DEF.GHI
, the qualifiers areABC
,DEF
, andGHI
.For example,
ABC.*.JKL
would apply to the objectsABC.DEF.JKL
, andABC.GHI.JKL
. (Note that it would not apply toABC.JKL
; * used in this context always indicates one qualifier.) - A character within a qualifier in a profile name to match zero or more characters within the qualifier in an object name.
For example,
ABC.DE*.JKL
would apply to the objectsABC.DE.JKL
,ABC.DEF.JKL
, andABC.DEGH.JKL
.
- A qualifier in a profile name to match any one qualifier in an object name. A qualifier is the part of an object name delimited by a period. For example, in
- **
- Use the double asterisk (**) once in a profile name as:
- The entire profile name to match all object names. For example, if you use the keyword
OBJTYPE (*PRC)
to identify processes, then use ** as the profile name, you change the authorizations for all processes. - As either the beginning, middle, or ending qualifier in a profile name to match zero or more qualifiers in an object name. For example,
**.ABC
identifies all objects with the final qualifier ABC.
- The entire profile name to match all object names. For example, if you use the keyword
Profile priorities
GRTMQMAUT OBJ(AB.*) OBJTYPE(*Q) USER(FRED) AUT(*PUT) MQMNAME(MYQMGR)
GRTMQMAUT OBJ(AB.C*) OBJTYPE(*Q) USER(FRED) AUT(*GET) MQMNAME(MYQMGR)
The first gives put authority to all queues for the principal FRED
with names that match the profile AB.*; the second gives get authority to the same types of queue that match the profile AB.C*.
Suppose that you now create a queue called AB.CD. According to the rules for wildcard matching, either GRTMQMAUT could apply to that queue. So, does it have put or get authority?
To find the answer, you apply the rule that, whenever multiple profiles can apply to an object, only the most specific applies. The way that you apply this rule is by comparing the profile names from left to right. Wherever they differ, a non-generic character is more specific than a generic character. So, in the previous example, the queue AB.CD has get authority (AB.C* is more specific than AB.*).
- ?
- *
- **