Skip to content

Unable to Connect to Proxy User Using Kerberos Authentication with oci_connect() #25

@tadasvu

Description

@tadasvu

Can't connect to proxy user while using kerberos.

oci_connect( $username = '[PROXY_USER]', $password = '', $connection_string = 'tns_alias', $encoding = null, $session_mode = 2147483648)

or

oci_connect( $username = 'MY_USER[PROXY_USER]', $password = '', $connection_string = 'tns_alias', $encoding = null, $session_mode = 2147483648)

Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password

pecl-database-oci8/oci8.c

Lines 828 to 831 in 35a0e90

if (username_len != 1 || username[0] != '/' || password_len != 0) {
php_error_docref(NULL, E_WARNING, "OCI_CRED_EXT can only be used with a username of \"/\" and a NULL password");
return NULL;
}

This logic is causing the error because the username is not /, which is a requirement when using OCI_CRED_EXT for external authentication.

Usual proxy connection string for oracle looks like this while on kerberos:

sqlplus [PROXY_USER]@database

Is this know limitation or there is some other way to achieve this? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions