korodani
korodani

Reputation: 178

Create Oracle DB user with expiration time

I would like to create an Oracle DB user and I would like to disable him in exactly 8 hours. I don't care if a user just gets locked or if all of his roles are revoked, I just want to prevent him from doing any activities on DB exactly 8 hours after his DB user was created.

Does Oracle provide such option out of the box ?

If not, I might go with the following solution:

My proposed solution is very nasty so I really hope there's a better solution for my issue.

Upvotes: 0

Views: 404

Answers (1)

Littlefoot
Littlefoot

Reputation: 143088

How about creating a profile

which is a set of limits on database resources. If you assign the profile to a user, then that user cannot exceed these limits.

Especially check the following parameters:

  • CONNECT_TIME: Specify the total elapsed time limit for a session, expressed in minutes
  • PASSWORD_LIFE_TIME: Specify the number of days the same password can be used for authentication. If you also set a value for PASSWORD_GRACE_TIME, then the password expires if it is not changed within the grace period, and further connections are rejected. If you omit this clause, then the default is 180 days

Upvotes: 2

Related Questions