DataSource in WAS7 and Oracle DB Kerberos - oracle

I've got user in Oracle DB which is created as "identified externally" and logs in via Kerberos. Is it possible to configure WAS7 DataSource to establish connection under this user?
When user in Oracle is created as "identified by password" there is no problems, I just create in WAS7 JAAS J2C Authentification Data and set it as "Component-managed authentification alias".

Related

Spring Cloud Config Server Setting Datasource Dynamically

I have a small doubt. I need to connect Spring Cloud Config Server with JDBC Backend. But the credentials to connect to the DB aren’t readily available. The real password has to be retrieved from Cyberark using a nickname and I have relevant Java Code for the same. I need a mechanism where this deciphered Password and Username can be used for setting the datasource of the Spring Cloud Config Server. Is this possible?

spring data jpa datasource connect to Oracle DB with trust store password

new spring boot application using spring data jpa and we need to connect oracle DB without password set in spring.datasource.password instead need to use connectionProperties with javax.net.ssl.truststore file and javax.net.ssl.truststorePassword.
please help me how we can go with approach to connect DB with spring data jpa?
existing application used same without DB password but used certificate to connect DB in jdbc template.
spring.datasource.url
spring.datasource.driverClassName
spring.datasource.username
// No DB password here but we need to use certificates
javax.net.ssl.truststore = load cert file from file path
javax.net.ssl.trustStoreType
javax.net.ssl.truststorePassword = load encrypted cert password from file path
Can you check the details in the blog? You do need the password along with the certificate. Certificate is to enable stronger security with SSL but not to eliminate database password.
You can leave oracle bound to localhost and use SSH tunnel on spring to connect to it.
On the Oracle server use key to connect ssh instead of password.
Check out this: https://stackoverflow.com/a/71766760/4903232

how to get tomcat session attribute from oracle

I have a web application made using Oracle Apex that implements the session management itself transparently, and I have implemented two-way SSL configuration in tomcat.
So my basic configuration is following
database: oracle 11g
application server: tomcat 7
apex 5.1
Now I need to add a token-based authentication so I have added a filter in the "ORDS" (Oracle Rest Data Service) configuration files and added a Java class. Now I have my token attribute added to the tomcat sessions:
But I need to access those attributes from inside my Oracle Database (in Java or PL/SQL) so I can do the authentication with it.
The Session.getAttribute doesn't seem to work there because all I have (sent via cookie) from tomcat session is just its jsessionid

Authentication support for the Spring Security plugin, authenticate using DB if ldap not available

I have a requirement in grails spring security.
When the user logs in to the application, check if ldap is available, then authenticate using ldap.
If ldap is not available, then authenticate using database.
Please let me know if it is possible.
My App does the following,
it checks for the user in ldap, if the user is not available in ldap, then it checks database which is ok, if ldap is not reachable for some reason, then it is failing with an error "unable to connect to ldap server"
but my requirment is, If ldap is not reachable, then authenticate with database.

Spring using different DataSource that depends on user

I have web application and i use Spring MVC. Now i'd like to add to different dataSources for administrator and for simple user. So my application should connect through anonymous user to DB, that can only select from tables and insert into some tables. But when user authorize himself by admin - application should change user and password on DB connection and connect with root authorities to DB. Is it possible to do this with spring 3.0.5?
Try with
org.springframework.jdbc.datasource.UserCredentialsDataSourceAdapter
you can set the credentials on the Datasource via setCredentialsForCurrentThread() method in the login filter, for example.

Resources