Does JBoss EAP supports RADIUS Authentication for Oracle Data Source configuration ?

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform
    • 7.x

Issue

  • Does JBoss supports RADIUS Authentication for Oracle Data Source configuration ?

Resolution

  • Please note that JBoss EAP just passes the connection string to the datasource driver, so it is something the Oracle Driver provides not JBoss EAP.
  String url ="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)"+
    "(HOST=oracleserver.mydomain.com)(PORT=5221))(CONNECT_DATA=" +
    "(SERVICE_NAME=orcl)))";

    Properties prop = new Properties();

    prop.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES,
      "("+AnoServices.AUTHENTICATION_RADIUS+")");
    // The user "aso" needs to be properly setup on the radius server with
    // password "1234".
    prop.setProperty("user","jboss");
    prop.setProperty("password","1234");

    Connection conn  = driver.connect(url,prop);
  • OracleConnection.CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES = oracle.net.authentication_services
    AnoServices.AUTHENTICATION_RADIUS = RADIUS

  • On an EAP datasource you can set connection-properties which is passed into Driver.connect(url, props)

      <xs:element name="connection-property" type="connection-propertyType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            <![CDATA[[
              The connection-property element allows you to pass in arbitrary connection
              properties to the Driver.connect(url, props) method. Each connection-property
              specifies a string name/value pair with the property name coming from the
              name attribute and the value coming from the element content. Ex:
              <connection-property name="char.encoding">UTF-8</connection-property>
             ]]>
          </xs:documentation>
        </xs:annotation>
  • So you could try :
                <datasource jndi-name="java:jboss/datasources/OracleDS" pool-name="OracleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
                    <connection-url> jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracleserver.mydomain.com)(PORT=5221))(CONNECT_DATA=(SERVICE_NAME=orcl))) </connection-url>
                    <connection-property name="oracle.net.authentication_services">
                        RADIUS
                    </connection-property>

Root Cause

Disclaimer: Links contained herein to external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.

[1] https://docs.oracle.com/database/121/JAJDB/oracle/jdbc/OracleConnection.html#CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES

[2] https://docs.oracle.com/database/121/JAJDB/constant-values.html#oracle_jdbc_OracleConnection_CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES

[3] https://docs.oracle.com/cd/E11882_01/network.112/e40393/asojbdc.htm#ASOAG9613

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments