Articles Tagged ‘authentication’
Sunday, March 13th, 2016
OAuth2 is a frequently used standard for authorization and with Spring Boot it is easy to set up authorization and resource server in no time.
In the following short tutorial I’d like to demonstrate how to set up an OAuth2 authorization server as well as a connected and secured resource server within a few minutes using Java, Maven and Spring Boot.
(more…)
Tags: authentication, boot, identity, oauth, oauth2, postman, protocol, security, Snippet, spring, standard
Posted in Java | 32 Comments »
Sunday, January 18th, 2015
When there is the need to create load tests or performance tests for an application, Apache JMeter is a handy tool and set up with ease.
In the following short tutorial I’d like to demonstrate how to configure JMeter to log into a Java EE web application with multiple users specified in a CSV file, how to generate some basic reports and how to integrate JMeter into a mavenized build using the JMeter Maven Plugin.
(more…)
Tags: assertion, authentication, benchmark, benchmarking, gatling, javaee, jmeter, listener, maven, profiling, sampler, test, testing
Posted in Java, testing | 2 Comments »
Sunday, December 21st, 2014
Especially when it comes to testing, setting up a decent environment for a secured Java EE web application isn’t always an easy thing to do.
In the following tutorial I’d like to demonstrate how to create a secured web application using form-based authentication and a JDBC realm to fetch users and roles and how to run the application in an embedded container for testing and development.
Additionally I’d like to show how to write and run integration tests to verify the security setup using a setup of Maven, Embedded GlassFish, Arquillian, jUnit and rest-assured.
(more…)
Tags: arquillian, authentication, eclipselink, glassfish, h2, it, javaee, jdbc, jdbcrealm, junit, maven, rest, rest-assured, security, testing
Posted in Enterprise, Java | 1 Comment »
Monday, May 26th, 2014
Using dependency injection and aspect-oriented mechanisms like interceptors allow us to separate cross-cutting-concerns in our Java enterprise application, to control global aspects of our application and to avoid boilerplate code.
In the following short tutorial we’re going to create an aspect-oriented logger to protocol the initiating user, class and method called and the parameters passed to the method and finally we’re adding this interceptor to a sample RESTful web-service by adding a simple annotation.
(more…)
Tags: aop, authentication, basic-auth, cdi, di, ejb, glassfish, interceptor, javaee, javaee7, jax-rs, jaxrs, jee, logging, rest
Posted in Enterprise, Java | 2 Comments »
Wednesday, October 12th, 2011
The Tomcat Maven Plugin not only allows us to deploy our mavenized application to an existing Tomcat server but also to run our web application with an embedded instance from our project’s directory. Recently I needed to add basic authentication to such an instance and wanted to share the steps necessary here
(more…)
Tags: authentication, basic-auth, maven, realm, servlet, tomcat
Posted in Java | 2 Comments »