Overview

This type allows you to grant users rights to specified database objects.

To grant user SCOTT execute and debug rights on on the sys.dbms_aqin packgage, you can use:

ora_object_grant{'SCOTT->sys.dbms_aqin@SID':
  permissions => ['execute', 'debug'],
}

If you want to make sure the user only has execute rights, use:

ora_object_grant{'OTHER_USER->sys.dbms_aqin@SID':
   permissions => ['execute'],
}

If you want to make sure no permissions are granted, you can use an empty array like this:

ora_object_grant{'OTHER_USER->sys.dbms_aqin':
   permissions => [],
}

Experience the Power of Puppet for Oracle

If you want to play and experiment with Puppet and Oracle, please take a look at our playgrounds. At our playgrounds, we provide you with a pre-installed environment, where you experiment fast and easy.

Attributes

Attribute Name Short Description
common_permissions The permissions on the specified object, granted to the specified user.
common_with_grant_permissions The permissions on the specified object, granted to the specified user with the option to regrant to an other user.
disable_corrective_change Disable the modification of a resource when Puppet decides it is a corrective change.
disable_corrective_ensure Disable the creation or removal of a resource when Puppet decides is a corrective change.
grantee The Oracle username that is granted (or revoked) the permission.
name The object and name combination you want to manage.
object_name The object name.
permissions The permissions on the specified object, granted to the specified user.
provider resource.
sid SID to connect to.
with_grant_permissions The permissions on the specified object, granted to the specified user with the option to regrant to an other user.

common_permissions

The permissions on the specified object, granted to the specified user.

This is a required array of rights to grant on the user object combination

ora_object_grant{ ...:
  common_permissions => ['execute', 'select'],
}

When this list contains less rights then currently granted, the the extra rights will be revoked from the user. If the permissions list contains more rights then currently granted in the database, the extra rights will be granted to the user.

If you want to make sure no rights are granted, you must use an empty array.

ora_object_grant{ ...:
  common_permissions => ['execute', 'select'],
}

Back to overview of ora_object_grant

common_with_grant_permissions

The permissions on the specified object, granted to the specified user with the option to regrant to an other user.

This is a required array of rights to grant on the user object combination

ora_object_grant{ ...:
  common_with_grant_permissions => ['execute', 'select'],
}

When this list contains less rights then currently granted, the the extra rights will be revoked from the user. If the permissions list contains more rights then currently granted in the database, the extra rights will be granted to the user.

If you want to make sure no rights are granted, you must use an empty array.

ora_object_grant{ ...:
  common_with_grant_permissions => ['execute', 'select'],
}

Back to overview of ora_object_grant

disable_corrective_change

Disable the modification of a resource when Puppet decides it is a corrective change.

(requires easy_type V2.11.0 or higher)

When using a Puppet Server, Puppet knows about adaptive and corrective changes. A corrective change is when Puppet notices that the resource has changed, but the catalog has not changed. This can occur for example, when a user, by accident or willingly, changed something on the system that Puppet is managing. The normal Puppet process then repairs this and puts the resource back in the state as defined in the catalog. This process is precisely what you want most of the time, but not always. This can sometimes also occur when a hardware or network error occurs. Then Puppet cannot correctly determine the current state of the system and thinks the resource is changed, while in fact, it is not. Letting Puppet recreate remove or change the resource in these cases, is NOT wat you want.

Using the disable_corrective_change parameter, you can disable corrective changes on the current resource.

Here is an example of this:

crucial_resource {'be_carefull':
  ...
  disable_corrective_change => true,
  ...
}

When a corrective ensure does happen on the resource Puppet will not modify the resource and signal an error:

    Error: Corrective change present requested by catalog, but disabled by parameter disable_corrective_change
    Error: /Stage[main]/Main/Crucial_resource[be_carefull]/parameter: change from '10' to '20' failed: Corrective change present requested by catalog, but disabled by parameter disable_corrective_change. (corrective)

Back to overview of ora_object_grant

disable_corrective_ensure

Disable the creation or removal of a resource when Puppet decides is a corrective change.

(requires easy_type V2.11.0 or higher)

When using a Puppet Server, Puppet knows about adaptive and corrective changes. A corrective change is when Puppet notices that the resource has changed, but the catalog has not changed. This can occur for example, when a user, by accident or willingly, changed something on the system that Puppet is managing. The normal Puppet process then repairs this and puts the resource back in the state as defined in the catalog. This process is precisely what you want most of the time, but not always. This can sometimes also occur when a hardware or network error occurs. Then Puppet cannot correctly determine the current state of the system and thinks the resource is changed, while in fact, it is not. Letting Puppet recreate remove or change the resource in these cases, is NOT wat you want.

Using the disable_corrective_ensure parameter, you can disable corrective ensure present or ensure absent actions on the current resource.

Here is an example of this:

crucial_resource {'be_carefull':
  ensure                    => 'present',
  ...
  disable_corrective_ensure => true,
  ...
}

When a corrective ensure does happen on the resource Puppet will not create or remove the resource and signal an error:

    Error: Corrective ensure present requested by catalog, but disabled by parameter disable_corrective_ensure.
    Error: /Stage[main]/Main/Crucial_resource[be_carefull]/ensure: change from 'absent' to 'present' failed: Corrective ensure present requested by catalog, but disabled by parameter disable_corrective_ensure. (corrective)

Back to overview of ora_object_grant

grantee

The Oracle username that is granted (or revoked) the permission.

This parameter is extracted from the title of the type. It is separated by the object by a /.

ora_object_grant { 'SCOTT->sys.dbms_aqin@SID':
  ...
}

In this example SCOTT is the grantee. Grantee names will always be uppercased by Puppet. This means in Puppet you can use either lower, upper or mixed case. In Oracle, it will be always be an upper case string.

Back to overview of ora_object_grant

name

The object and name combination you want to manage. Including an appended SID.

ora_object_grant { 'SCOTT->sys.dbms_aqin@SID':
  ...
}

The SID is optional. When you don’t specify an SID, Puppet will take the first ASM instance from the /etc/oratab file and use that as the SID. We recoomend you always use a full qualified name (e.g. a name including the SID).

Back to overview of ora_object_grant

object_name

The object name.

This parameter is extracted from the title of the type. It is the first part of the name.

ora_object_grant { 'SCOTT->sys.dbms_aqin@SID':
  ...
}

In this example sys.dbms_aqin is the object name. The object names will always be uppercased by Puppet. This means in Puppet you can use either lower, upper or mixed case. In Oracle, it will be always be an upper case string.

You must specify full qualified object names. This means owner.object.

The table may be a valid sql wildcard like DBA_%. Here is an example of such a resource definition:

ora_object_grant { 'APPQOSSYS->SYS.DBA_%@TEST':
  permissions => [],
}

This wil revoke all rights on all DBA tables from user APPQOSSYS.

Back to overview of ora_object_grant

permissions

The permissions on the specified object, granted to the specified user.

This is a required array of rights to grant on the user object combination

ora_object_grant{ ...:
  permissions => ['execute', 'select'],
}

When this list contains less rights then currently granted, the the extra rights will be revoked from the user. If the permissions list contains more rights then currently granted in the database, the extra rights will be granted to the user.

If you want to make sure no rights are granted, you must use an empty array.

ora_object_grant{ ...:
  permissions => ['execute', 'select'],
}

Back to overview of ora_object_grant

provider

The specific backend to use for this ora_object_grant resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.Available providers are:

prefetching
Manage Oracle object permissions via regular SQL

Back to overview of ora_object_grant

sid

SID to connect to.

All types have a name like resource@sid. The sid is optional. If you don’t specify the sid, the type will use the database from the /etc/ora_setting.yaml with the property default set to true. We advise you to either use @sid in all your manifests or leave it empty everywhere.

Back to overview of ora_object_grant

with_grant_permissions

The permissions on the specified object, granted to the specified user with the option to regrant to an other user.

This is a required array of rights to grant on the user object combination

ora_object_grant{ ...:
  with_grant_permissions => ['execute', 'select'],
}

When this list contains less rights then currently granted, the the extra rights will be revoked from the user. If the permissions list contains more rights then currently granted in the database, the extra rights will be granted to the user.

If you want to make sure no rights are granted, you must use an empty array.

ora_object_grant{ ...:
  with_grant_permissions => ['execute', 'select'],
}

Back to overview of ora_object_grant