database authentication with cas server module - single-sign-on

I am in process of implementing SSO for two web-applications (both jsp-servlet MVC based).
The user credentials in sqlite database "App1.db" within table LOGIN(USERNAME,PASSWORD).
CAS's official page mentions support for MySql and oracle ,but nowhere it mentions non-compatibility with "other" databases .So, is there a way to integrate this sqlite database with CAS server module for authentication ?

Most of the CAS Server documentation is community driven. The authors of the page you referenced have worked with MySQL and Oracle. I personally have connected it up to Microsoft SQL Server without issue... because it uses JDBC.
CAS JDBC Authentication Handler uses Spring and JDBC. JDBC is generic by design. So if your sqlite database has a JDBC driver, then you should be good to go.

Related

Suggestion or help needed for implementing stateless ejabberd architecture

I want to implement a real-time chat application. Technologies, database and OS used for this purpose:
Node.JS
Ejabberd as XMPP server
MySQL Database
React-Native (Front-End)
OS - Ubuntu 18.04
By far, I have achieved setting up ejabberd and registering the user and getting status from both the API and command line. For example, I can register a user from any other device/system and from the command line too. But the problem with this is that all the data gets stored in ejabberd database on the Ubuntu server due to which there are data duplication chances also I already have a database structured and defined and already have data in that.
In ejabberd tutorials, there is a part where they have mentioned stateless architecture where the ejabberd server manages XMPP part with our database (I didn't understand a lot about this stateless thing). So I need some help, example or tutorials where there is more understanding about the stateless architecture.
Already gone through below mentioned links -
https://blog.process-one.net/wp-content/uploads/2016/09/designing-a-modern-XMPP-service-with-ejabberd.pdf
https://www.youtube.com/watch?v=-dqQfCpw98E&feature=youtu.be&t=1m33s (Tutorial where Stateless is mentioned)
https://www.slideshare.net/mremond/xmpp-academy-2
https://docs.ejabberd.im/tutorials/ (Official tutorials about ejabberd)
Not-helpful links -
ejabberd stateless configuration
To configure stateless ejabberd, you need to configure your storage module to store the data using ReST API. Stateless ejabberd was designed for fluux.io service, but you can also implement it yourself using contributions or ejabberd API.
For example, for user based, you can rely on ejabberd_auth_http: https://github.com/processone/ejabberd-contrib/tree/master/ejabberd_auth_http

Existing db2 database in liberty worksphere app in bluemix

I have deployed a Worksphere Liberty project from eclipse to Bluemix. Now I want to connect it with an existing Db2 database. What are the steps to follow?
Check out the example app Java DB Web Starter. It uses a DB2 database in Bluemix.
Does your existing database have a URL which is accessible from the internet? If so, you can directly talk to the database from your Bluemix application.
Class.forName("com.ibm.db2.jcc.DB2Driver");
Connection connection = connection = DriverManager.getConnection("jdbc:db2://localhost:50000/yourdb", "username", "pwd");
Be sure to package the db2 driver jar in your WEB-INF/lib.
If your datasource definition is already defined in a Liberty server.xml config, you can push the entire liberty server pacakge.
If your existing database is behind a company firewall, look at the Secure Gateway to expose the connection securely.
Assuming you need to connect to an existing DB2 database that resides on-premises (outside of Bluemix), you would need to use the Bluemix Cloud Integration service. With it, you can move data or create REST APIs for Bluemix applications to access and use.
https://www.ng.bluemix.net/docs/#services/CloudIntegration/index.html#gettingstartedwithcloudintegation

Jboss 6.1 DV integration with IBM Mainframe

Does Jboss 6.1 Data Virtualization beta provides integration with Mainframe using RACF protocol authorization ? I searched thru the internet and couldn't get any detail procedure.
RACF is what is known in the mainframe world as an External Security Manager (ESM). There exist other ESMs such as ACF2 and Top Secret. Other products such as CICS and DB2 communicate with the resident ESM for authentication and authorization purposes.
You don't communicate with the ESM, you communicate with (for example) DB2 supplying your authentication credentials and DB2 asks the ESM to authenticate you.
I am not a JBoss person, but I think you want to read Chapter 3 in the Security Guide.

How to establish connection between db and java code in bluemix

I am making a web application in bluemix and for that, I chose java db web starter as boiler plate. I made html files in eclipse and I want db connectivity. I made a table in database (viz userInformation), but I am not getting that where and what code should be written to establish connection. Please help.
If you're deploying a Liberty application, and using the SQLDB service, the connection information and the db driver jar should be automatically configured in the server.xml and a datasource is created for you. You can access it using JNDI. Take a look at this example:
https://developer.ibm.com/bluemix/2014/02/07/java-db2-10-minutes/
Your other option is to parse the VCAP_SERVICES environment variable and read the connection information out of it. Example: https://github.com/IBM-Bluemix/get-started-java
The Bluemix documentation has a lot information on how to make the connection for each services.
Also, you will need to have some server side java code like a Servlet to make this db connection. You can not connect directly from your client side html code.
https://github.com/IBM-Bluemix/java-db

Astoria vs. SQL Server Data Services

What are in your opinion big differences between areas of usage for "Astoria" (ADO.NET data services) and SQL Server Data Services?
They are similiar but very different technologies. Astoria or what is now called at Microsoft ADO.NET Data Services is a programming library that will allow data to be passed through RESTful web services. You develop these web services to be run against data you have access to. ADO.NET Data Services is now included in the .NET 3.5 SP1 updates.
SQL Server Data Services is a new service provided by Microsoft. The following is a decription:
"SQL Server Data Services (SSDS) are highly scalable, on-demand data
storage and query processing utility
services. Built on robust SQL Server
database and Windows Server
technologies, these services provide
high availability, security and
support standards-based web interfaces
for easy programming and quick
provisioning."
SQL Server Data Services is very similair to Amazon S3 service.
I'm pretty sure you can call both Astoria and SQL Data Services with the same code in your app. So it depends on where you want your data - on your servers or in the cloud.