Skip to content

JCS-14035 - Fail to get password expiry date when using connect string #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

telake
Copy link
Member

@telake telake commented Sep 25, 2023

Bug - Fail to get password expiry date for OPSS user when using connect string

Note that since the DB service name is not guaranteed to include the PDB name ( I proved this by using a connect string w/o the PDB name in it to successfully create a WLS for OCI instance). Therefore, the PDB name must be asked for.

Also note that the validation change added will not be executed, but to limit the scope of the changes I updated the validation only and didn't try to also add in the validator. I suspect that the validation was never added in order to ensure that 11g databases, which don't have a PDB can be allowed.

Tested that when setting a connect string the error occurred. After the fix, with PDB name provided, the error did not occur.

… connect string.

Note that since the DB service name is not guaranteed to include the PDB name the PDB name must be asked for.
Also note that the validation change added will not be executed, but to limit the scope of the changes I updated the validation only and didn't try to also add in the validator. I suspect that the validation was never added in order to ensure that 11g databases, which don't have a PDB can be allowed.
@HarshadVilekar
Copy link
Contributor

  1. The change looks fine to me.

  2. In DBPasswordExpirtyCheck.java - we are throwing an exception on line 107:
    printException("Failed to get password expiry date for OPSS User.", e.getMessage());
    Will it help to include the PDB name in this exception message?

  3. Not related to this fix, but since 11g is mentioned in this change request, will the statement on line 90:
    ALTER SESSION SET CONTAINER =
    fail if 11g is used?

@telake
Copy link
Member Author

telake commented Sep 26, 2023

  1. The change looks fine to me.
  2. In DBPasswordExpirtyCheck.java - we are throwing an exception on line 107:
    printException("Failed to get password expiry date for OPSS User.", e.getMessage());
    Will it help to include the PDB name in this exception message?
    While additional information in error messages is helpful the try block covers more than just the PDB switch. I'd prefer to target any better message handling more comprehensively so, unless you object, I'm going to leave this as is.
  1. Not related to this fix, but since 11g is mentioned in this change request, will the statement on line 90:
    ALTER SESSION SET CONTAINER =
    fail if 11g is used?
    Yes, it will fail. 11g database usage is unlikely since you cannot create a new OCI DB under this version. Usage of an existing 11g database is possible, though. Given the unlikeliness of this and my inability to test this scenario I'm inclined to leave it as is. I think the more likely future change is to get rid of our support for 11g. Keep in mind that 11g has been out of extended support since 31-DEC-2020.

@telake
Copy link
Member Author

telake commented Sep 26, 2023

Per discussion on DBPasswordExpirtyCheck.java we agreed to make sure the error message with exact ORA error is shown in the troubleshooting section so people will know what is wrong.

@telake telake merged commit 25666e2 into development Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants