5 Replies Latest reply on Dec 11, 2014 1:47 PM by 2807726

    How can I set the oracle.net.authentication_services database property in SQLDeveloper?

    2807726

      In IntelliJ, I am able to set the oracle.net.authentication_services database property. Am I able to set the same property via SQLDeveloper? Setting that property via tnsnames.ora or through the SQLDeveloper UI, would be ideal. I'm not having much luck figuring out where these properties are located. :/


      Thanks!

        • 1. Re: How can I set the oracle.net.authentication_services database property in SQLDeveloper?
          Gary Graham-Oracle

          Isn't oracle.net.authentication_services a JDBC property?  You might try using a Custom JDBC URL for Connection Type: Advanced.  But in that case, you will need either a full or instant Oracle client installed also since Advanced requires use of the JDBC OCI/Thick driver.

          1 person found this helpful
          • 3. Re: How can I set the oracle.net.authentication_services database property in SQLDeveloper?
            2807726

            I should have put this information in my original post, but here it is now. I'm running OS X Mavericks and I have instantclient_11_2 installed.

             

            I've seen lots of examples where you can use custom parameters in Java code like this:

             

            Properties props = new Properties();

            props.add("username", "username");

            props.add("password", "password");

            props.add("oracle.net.authentication_services", "radius");

             

            OracleDataSource ods = new OracleDataSource();

            ods.setUrl("dbUrl");

            ods.setConnectionProperties(props);

             

            However, I can't seem to get that last property into the connection string. Well... I can, but it throws errors.

             

            If I use this URL: jdbc:oracle:thin:@[db_hostname]:[db_port]/[service_name],oracle.net.authentication_services=radius

            I get one of two errors:

            Failure - Test failed: IO Error: Got minus one from a read call

            Failure - Test failed: IO Error: Undefined Error

            • 4. Re: How can I set the oracle.net.authentication_services database property in SQLDeveloper?

              I've seen lots of examples where you can do that in Java code like this:

               

              Properties props = new Properties();

              props.add("username", "username");

              props.add("password", "password");

              props.add("oracle.net.authentication_services", "radius");

               

              OracleDataSource ods = new OracleDataSource();

              ods.setUrl("dbUrl");

              ods.setConnectionProperties(props);

               

              Have you seen ANY examples like that that actually work?

               

              The Properties class doesn't have an 'add' method'; you use setProperty.

               

              You are also mixing two DIFFERENT, things: SSL authentication with RADIUS support.

              I'm not having much luck figuring out where these properties are located.

              The FIRST place to look/search for info about Oracle functionality is the Oracle documentation.

               

              This Oracle white paper discusses 'SSL With Oracle JDBC Thin Driver'.

              http://www.oracle.com/technetwork/database/enterprise-edition/wp-oracle-jdbc-thin-ssl-130128.pdf

               

              Pages 8 and 14 both talk about that parameter and how to set it properly.

               

              The JDBC Dev Guide has a whole chapter on 'Support for RADIUS'.

              https://docs.oracle.com/cd/B28359_01/java.111/b31224/clntsec.htm#CIHEAJII

              Code Example

              This example demonstrates the new RADIUS authentication feature that is a part of Oracle Database 11g Release 1 (11.1) JDBC thin driver. You need to have a working setup, that is, a RADIUS server up and running, and an Oracle database server that is configured to use RADIUS authentication. You then need to change the URLs given in the example to compile and run it.

              Note that the example in that doc does NOT use the parameter you mention or that is discussed in the first doc.

               

              That is because SSL can be used for either Server Authentication, encryption, or both while RADIUS is an authentication service.

              • 5. Re: How can I set the oracle.net.authentication_services database property in SQLDeveloper?
                2807726

                One of the developers I work with got this to work by doing the following:


                1. Make a sqlnet.ora file in the root of your instant client install. This needed to have the following fields:


                    NAME.DEFAULT_ZONE = ...

                    NAMES.DEFAULT_DOMAIN = ...

                    SQLNET.CRYPTO_SEED = ....

                    SQLNET.AUTHENTICATION_SERVICES = (radius)

                 

                    The NAME.DEFAULT_ZONE, NAMES.DEFAULT_DOMAIN, and SQLNET.CRYPTO_SEED had to come from our DBAs.

                 

                    We were also given a tnsnames.ora with all our databases in it, but I don't think this was necessary.

                 

                2. I had to update the sqldeveloper.sh file located at SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh to include the following lines:

                 

                    export TNS_ADMIN="/path/to/instantclient_11_2"

                    export DYLD_LIBRARY_PATH=$TNS_ADMIN

                    export LD_LIBRARY_PATH=$TNS_ADMIN

                    export SQLPATH=$TNS_ADMIN

                 

                3. In SQLDeveloper, in the Preferences -> Database -> Advanced page, I checked the "Use Oracle Client" box. Clicked the "Configure" button and selected "Instant Client" as the client type and put the "/path/to/instantclient_11_2" in the client location box. I clicked "Test" and got no errors.

                 

                4. Back on the Preferences -> Database -> Advanced page, I checked the "Use OCI/Thick driver" box.

                 

                5. I put the "/path/to/instantclient_11_2" in the Tnsnames Directory field. I just dumped my sqlnet.ora and tnsnames.ora files into the root of my instant client install.