FAQ
Is it possible to set the OS User using go-oci8? I posted a couple of
questions on Stack Overflow (OCI
<http://stackoverflow.com/questions/26115614/setting-os-user-with-oracle-call-interface-oci>
and running as different users in windows
<http://stackoverflow.com/questions/26123218/on-windows-is-it-possible-to-run-a-single-goroutine-as-a-different-user>)
related to this topic. What I'd really like to do is be able to set the OS
User for each database connection as the database uses Username, Password
and the Operating System User as part of it's security setup. I looked at
the golang code and the OCI api but I couldn't work out if it was possible
or how to do it.

Any help or hints would be gratefully received.

Cheers

Jimbo Jambo

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Matt Harden at Oct 1, 2014 at 11:51 pm
    I don't think the OCI will allow you to bypass something that's designed to
    be a security check. You need to actually run your program under the OS
    user that the database expects.
    On Wed, Oct 1, 2014 at 4:02 PM, Jimbo Jambo wrote:

    Is it possible to set the OS User using go-oci8? I posted a couple of
    questions on Stack Overflow (OCI
    <http://stackoverflow.com/questions/26115614/setting-os-user-with-oracle-call-interface-oci>
    and running as different users in windows
    <http://stackoverflow.com/questions/26123218/on-windows-is-it-possible-to-run-a-single-goroutine-as-a-different-user>)
    related to this topic. What I'd really like to do is be able to set the OS
    User for each database connection as the database uses Username, Password
    and the Operating System User as part of it's security setup. I looked at
    the golang code and the OCI api but I couldn't work out if it was possible
    or how to do it.

    Any help or hints would be gratefully received.

    Cheers

    Jimbo Jambo

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Jimbo Jambo at Oct 2, 2014 at 9:49 am
    It's interesting as I can do this with the JDBC driver by passing a
    properties object containing a "v$session.osuser" parameter with the
    connection string details during connection set up. I naively thought that
    if the Java driver provided the functionality to switch OS User on
    connection set up it would be mirrored in the OCI driver.
    On Thursday, 2 October 2014 00:53:31 UTC+1, Matt Harden wrote:

    I don't think the OCI will allow you to bypass something that's designed
    to be a security check. You need to actually run your program under the OS
    user that the database expects.

    On Wed, Oct 1, 2014 at 4:02 PM, Jimbo Jambo <graham.b...@googlemail.com
    <javascript:>> wrote:
    Is it possible to set the OS User using go-oci8? I posted a couple of
    questions on Stack Overflow (OCI
    <http://stackoverflow.com/questions/26115614/setting-os-user-with-oracle-call-interface-oci>
    and running as different users in windows
    <http://stackoverflow.com/questions/26123218/on-windows-is-it-possible-to-run-a-single-goroutine-as-a-different-user>)
    related to this topic. What I'd really like to do is be able to set the OS
    User for each database connection as the database uses Username, Password
    and the Operating System User as part of it's security setup. I looked at
    the golang code and the OCI api but I couldn't work out if it was possible
    or how to do it.

    Any help or hints would be gratefully received.

    Cheers

    Jimbo Jambo

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Matt Harden at Oct 2, 2014 at 3:50 pm
    I see. Then I'm sure it can be done with OCI as well. Sorry for the noise.
    On Thu, Oct 2, 2014 at 4:49 AM, Jimbo Jambo wrote:

    It's interesting as I can do this with the JDBC driver by passing a
    properties object containing a "v$session.osuser" parameter with the
    connection string details during connection set up. I naively thought that
    if the Java driver provided the functionality to switch OS User on
    connection set up it would be mirrored in the OCI driver.
    On Thursday, 2 October 2014 00:53:31 UTC+1, Matt Harden wrote:

    I don't think the OCI will allow you to bypass something that's designed
    to be a security check. You need to actually run your program under the OS
    user that the database expects.

    On Wed, Oct 1, 2014 at 4:02 PM, Jimbo Jambo <graham.b...@googlemail.com>
    wrote:
    Is it possible to set the OS User using go-oci8? I posted a couple of
    questions on Stack Overflow (OCI
    <http://stackoverflow.com/questions/26115614/setting-os-user-with-oracle-call-interface-oci>
    and running as different users in windows
    <http://stackoverflow.com/questions/26123218/on-windows-is-it-possible-to-run-a-single-goroutine-as-a-different-user>)
    related to this topic. What I'd really like to do is be able to set the OS
    User for each database connection as the database uses Username, Password
    and the Operating System User as part of it's security setup. I looked at
    the golang code and the OCI api but I couldn't work out if it was possible
    or how to do it.

    Any help or hints would be gratefully received.

    Cheers

    Jimbo Jambo

    --
    You received this message because you are subscribed to the Google
    Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to golang-nuts...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Tamás Gulácsi at Oct 2, 2014 at 8:15 pm
    2014. október 2., csütörtök 17:50:39 UTC+2 időpontban Matt Harden a
    következőt írta:
    I see. Then I'm sure it can be done with OCI as well. Sorry for the noise.

    I'm not absolutely sure about this. The Oracle JDBC driver can use the
    OCI, or have a "thin" mode, where the protocol is spoken by the java
    driver, directly.
    http://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html
    lists a lot of settable properties, but no note about v$session.osuser.

    If you can find out what attribute should be set for ouser, we can build it
    into go-oci8.
    You should try the same code with "jdbc:oracle:oci@..." OCI connection mode!

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Jimbo Jambo at Oct 16, 2014 at 10:33 am
    Thanks for the reply. I tried my Java test code with both Thin and OCI
    drivers. Thin allows you to set the OS User but OCI does not. So I don't
    believe OCI supports this feature. The Oracle Docs also supports this ...

    http://docs.oracle.com/cd/E18283_01/appdev.112/e13995/oracle/jdbc/OracleConnection.html#CONNECTION_PROPERTY_THIN_VSESSION_OSUSER

    Thanks for the responses.
    On Thursday, 2 October 2014 21:15:09 UTC+1, Tamás Gulácsi wrote:

    2014. október 2., csütörtök 17:50:39 UTC+2 időpontban Matt Harden a
    következőt írta:
    I see. Then I'm sure it can be done with OCI as well. Sorry for the noise.

    I'm not absolutely sure about this. The Oracle JDBC driver can use the
    OCI, or have a "thin" mode, where the protocol is spoken by the java
    driver, directly.
    http://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html
    lists a lot of settable properties, but no note about v$session.osuser.

    If you can find out what attribute should be set for ouser, we can build
    it into go-oci8.
    You should try the same code with "jdbc:oracle:oci@..." OCI connection
    mode!
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 1, '14 at 9:03p
activeOct 16, '14 at 10:33a
posts6
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase