asks the user for multiple pieces of hard data that should have been
previously collected
send the password reset information to some
out-of-band side-channel
such as a (possibly different) email address or an SMS text number, etc. to be used in Step 3.
Step 2) Verify Security Questions
application verifies that each piece of data is correct for the given username
If anything is incorrect, or if the username is not recognized, the second page displays a generic error message such as “Sorry, invalid data”. If all submitted data is correct, Step 2 should display at least two of the user’s pre-established personal security questions, along with input fields for the answers.
Avoid sending the username as a parameter
Do not provide a drop-down list
server-side session
user's email account may have already been compromised
if your application uses Hibernate 3 classes that are not available in Hibernate 4, for example, some of the validator or search classes, you may see ClassNotFoundExceptions when you deploy your application. If you encounter this problem, you can try one of two approaches:
You may be able to resolve the issue by copying the specific Hibernate 3 JARs containing those classes into the application "/lib" directory or by adding them to the classpath using some other method. In some cases this may result in ClassCastExceptions or other class loading issues due to the mixed use of the Hibernate versions, so you will need to use the second approach.
You need to tell the server to use only the Hibernate 3 libraries and you will need to add exclusions for the Hibernate 4 libraries. Details on how to do this are described here: JPA Reference Guide.
In previous versions of the application server, the JCA data source configuration was defined in a file with a suffix of *-ds.xml. This file was then deployed in the server's deploy directory. The JDBC driver was copied to the server lib/ directory or packaged in the application's WEB-INF/lib/ directory.
In AS7, this has all changed. You will no longer package the JDBC driver with the application or in the server/lib directory. The *-ds.xml file is now obsolete and the datasource configuration information is now defined in the standalone/configuration/standalone.xml or in the domain/configuration/domain.xml file.
A JDBC 4-compliant driver can be installed as a deployment or as a core module. A driver that is JDBC 4-compliant contains a META-INF/services/java.sql.Driver file that specifies the driver class name. A driver that is not JDBC 4-compliant requires additional steps, as noted below.
DataSource Configuration
domain mode, the configuration file is the domain/configuration/domain.xml
standalone mode, you will configure the datasource in the standalone/configuration/standalone.xml
example of the driver element for driver that is not JDBC 4-compliant. The driver-class must be specified since it there is no META-INF/services/java.sql.Driver file that specifies the driver class name.
If your application's authentication process is username/password based
(like most), instead of implementing this interface yourself, take a look at the
UsernamePasswordToken class, as it is probably sufficient for your needs.
"If your application's authentication process is username/password based (like most), instead of implementing this interface yourself, take a look at the UsernamePasswordToken class, as it is probably sufficient for your need"
Domain object instance security: In many applications
it's desirable to define Access Control Lists (ACLs) for individual
domain object instances. We provide a comprehensive ACL package with
features including integer bit masking, permission inheritance
(including blocking), an optimized JDBC-backed ACL repository, caching
and a pluggable, interface-driven design.
OpenID Support: the web's emerging single sign-on standard
(supported by Google, IBM, Sun, Yahoo and others) is also supported in Spring
Security
Easy integration with existing databases: Our implementations
have been designed to make it easy to use your existing authentication schema
and data (without modification). Of course, you can also provide your own Data
Access Object if you wish.
Password encoding: Of course, passwords in your authentication
repository need not be in plain text. We support both SHA and MD5 encoding, and
also pluggable "salt" providers to maximise password security.
Caching: Spring Security optionally integrates with Spring's Ehcache factory. This flexibility
means your database (or other authentication repository) is not repeatedly queried
for authentication information when using Spring Security with stateless
applications.
Run-as replacement: The system fully supports temporarily
replacing the authenticated principal for the duration of the web request or
bean invocation. This enables you to build public-facing object tiers with
different security configurations than your backend objects.
Tag library support: Your JSP files can use our taglib to ensure
that protected content like links and messages are only displayed to users
holding the appropriate granted authorities. The taglib also fully integrates
with Spring Security's ACL services, and obtaining extra information about the
logged-in principal.
User Provisioning APIs: Support for groups, hierarchical roles
and a user management API, which all combine to reduce development time and
significantly improve system administration.
Enterprise-wide single sign on using CAS 3: Spring Security
integrates with JA-SIG's open source Central Authentication
Service (CAS)
log in options: log in with user name/password and log in with certificate
how to create custom realm and how to handle multi-realm scenario
account credentials and access rights are stored in database. Stored passwords are hashed and salted.
Authorization
If the realm wishes to do also authorization, it has to implement Authorizer interface. Each Authorizer method takes principal as parameter and checks either role(s) or permission(s)
Permissions are supplied either as strings or as permission objects
use WildcardPermissionResolver to convert strings into permission objects
connect application to database and create tables to store all user account data
replace IniRealm with realm able to read from database and salt passwords.
but don’t know how those dependencies are instantiated
And you shouldn’t really care, all that is important is that UserService depends on dao and webservice object.
BDD template given-when-then) tests are easy to read
@Entity
public class User
calling new User(“someName”,”somePassowrd”, “someOtherName”, “someOtherPassword”) becomes hardly readable and maintainable
code duplication
Maintaining this code would turn into a nightmare in no time
running the code above will throw an exception by the JPA provider,
since not-nullable password field was never set.
Joshua Blooch gives fine example of builder pattern.
Instead of making the desired object directly, the client calls a constructor (or static factory) with all of the required parameters and gets a builder object. Then the client calls setter-like methods on the builder object to set each optional parameter of interest. Finally, the client calls a parameterless build method to generate the object, which is immutable. The builder is a static member class of the class it builds.
Coffee
public static class Builder
Builder(CoffeeType type, int cupSize)
Builder withMilk()
Coffee build()
Coffee(this)
private Coffee(Builder builder)
Coffee coffee = new Coffee.Builder(CoffeeType.Expresso, 3).withMilk().build();2}
especially if most of those parameters are optional.
For all entity attributes I create private fields
those that are obligatory become parameters for the public constructor
parameter-less constructor, I create one, but I give him
always have to include this library in either
WEB-INF/lib
support for CDI is included in the library granite-cdi.jar
10.1. Configuration with Servlet 3
On Servlet 3 compliant containers, GraniteDS can use the new APIs to automatically register its own servlets and filters and thus does not need any
particular configuration in web.xml. This automatic setup is triggered when GraniteDS finds a class annotated with
@FlexFilter in one of the application archives:
@FlexFilter declaration will setup an AMF processor for the specified url pattern
tideAnnotations
defines suitable default values
@TideEnabled
@RemoteDestination
always declared by default
tideInterfaces
tideRoles
exceptionConverters
amf3MessageInterceptor
10.3.2. Typesafe Remoting with Dependency Injection
It is possible to benefit from even more type safety by using the annotation [Inject] instead of In.
When using this annotation, the full class name is used to find the target bean in the CDI context instead of the bean name.
Security
integration between the client RemoteObject
credentials and the server-side container security
client-side component named
identity
API to define runtime authorization checks on the Flex UI
Subversion Tagging Plugin
— This plugin automatically performs subversion tagging (technically speaking svn copy) on successful build.
ViewVC Plugin
— This plugin integrates ViewVC browser interface for CVS and Subversion with Hudson.
Source code management
Build Pipeline Plugin
— This plugin creates a pipeline of Hudson\Jenkins jobs and gives a view so that you can visualise it.
Build tools
JBoss Management Plugin
— This plugin allows to manage a JBoss Application Server during build procedure
Maven 2 Project Plugin
— Jenkin's Maven 2 project type
Phing Plugin
— This plugin allows you to use Phing to build PHP projects.
Post build task
— This plugin allows the user to execute a shell/batch task depending on the build log output. Java regular expression are allowed.
Promoted Builds Plugin
— This plugin allows you to distinguish good builds from bad builds by introducing the notion of 'promotion'.
Publish Over SSH Plugin
— Publish files and/or execute commands over SSH (SCP using SFTP)
Selenium AES Plugin
— This plugin is for continuous regression test by Selenium Auto Exec Server (AES).
Vagrant Plugin
— This plugin allows booting of Vagrant virtual machines, provisioning them and also executing scripts inside of them
Unicorn Validation Plugin
— This plugin uses W3C's Unified Validator, which helps improve the quality of Web pages by performing a variety of checks.
Build wrappers
Android Emulator Plugin
— Lets you automatically generate, launch and interact with an Android emulator during a build, with the emulator logs being captured as artifacts.
Artifactory Plugin
— This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.
AWS Cloudformation Plugin
— A plugin that allows for the creation of cloud formation stacks before running the build and the deletion of them after the build is completed.
Build Keeper Plugin
— Select a policy for automatically marking builds as "keep forever" to enable long term analysis trending when discarding old builds - or use to protect logs and artifacts from certain builds
Build Name Setter Plugin
— This plugin sets the display name of a build to something other than #1, #2, #3, ...
SSH plugin
— You can use the SSH Plugin to run shell commands on a remote machine via ssh.
SeleniumRC Plugin
— This plugin allows you to create Selenium server instance for each project build.
Vagrant Plugin
— This plugin allows booting of Vagrant virtual machines, provisioning them and also executing scripts inside of them
Timestamper
— Adds timestamps to the Console Output.
VirtualBox Plugin
— This plugin integrates Jenkins with VirtualBox (version 3, 4.0 and 4.1) virtual machine.
Version Number Plugin
— This plugin creates a new version number and stores it in the environment variable whose name you specify in the configuration.
VMware plugin
— This plugin allows you to start a VMware Virtual Machine before a build and stop it again after the build completes.
AWS Cloudformation Plugin
— A plugin that allows for the creation of cloud formation stacks before running the build and the deletion of them after the build is completed.
Desktop Notifier for Jenkins
— This is useful for those who are looking for a Desktop Notifier for Jenkins builds to automatically notify you about failed builds directly from their desktops.
Email-ext plugin
— This plugin allows you to configure every aspect of email notifications. You can customize when an email is sent, who should receive it, and what the email says.
Google Calendar Plugin
— This plugin publishes build records over to Google Calendar
HTML5 Notifier Plugin
— Provides W3C Web Notifications support for builds.
Jabber Plugin
— Integrates Jenkins with the Jabber/XMPP instant messaging protocol. Note that you also need to install the instant-messaging plugin.
Build reports
Checkstyle Plugin
— This plugin generates the trend report for Checkstyle, an open source static code analysis program.
Clover PHP Plugin
— This plugin allows you to capture code coverage reports from PHPUnit. For more information on how to set up PHP projects with Jenkins have a look at the Template for Jenkins Jobs for PHP Projects.
Crap4J Plugin
— This plugin reads the "crappy methods" report from Crap4J. Hudson will generate the trend report of crap percentage and provide detailed information about changes.
Dependency Analyzer Plugin
— This plugin parses dependency:analyze goal from maven build logs and generates a dependency report
Dependency Graph View Plugin
— Shows a dependency graph of the projects using graphviz. Requires a graphviz installation on the server.
FindBugs Plugin
— This plugin generates the trend report for FindBugs, an open source program which uses static analysis to look for bugs in Java code.
Grinder Plugin
— This plugin reads output result files from Grinder performance tests, and will generate reports showing test results for every build and trend reports showing performance results across builds.
JSUnit plugin
— This plugin allows you publish JSUnit test results
Performance Plugin
— This plugin allows you to capture reports from JMeter and JUnit . Hudson will generate graphic charts with the trend report of performance and robustness.
PerfPublisher Plugin
— This plugin generates global and trend reports for tests results analysis. Based on an open XML tests results format, the plugin parses the generated files and publish statistics, reports and analysis on the current health of the project.
PMD Plugin
— This plugin generates the trend report for PMD, an open source static code analysis program.
Sonar plugin
— Quickly benefit from Sonar, an open-source dashboard based on many analysis tools like Checkstyle, PMD and Cobertura.
testng-plugin
— This plugin allows you to publish TestNG results.
Violations
— This plug-in generates reports static code violation detectors such as checkstyle, pmd, cpd, findbugs, codenarc, fxcop, stylecop and simian.
xUnit Plugin
— This plugin makes it possible to publish the test results of an execution of a testing tool in Jenkins.
Artifact uploaders
ArtifactDeployer Plugin
— This plugin makes it possible to copy artifacts to remote locations.
Artifactory Plugin
— This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.
Confluence Publisher Plugin
— This plugin allows you to publish build artifacts as attachments to an Atlassian Confluence wiki page.
Deploy Plugin
— This plugin takes a war/ear file and deploys that to a running remote application server at the end of a build
FTP-Publisher Plugin
— This plugin can be used to upload project artifacts and whole directories to an ftp server.
HTML Publisher Plugin
Publish Over FTP Plugin
— Publish files over FTP
Publish Over SSH Plugin
— Publish files and/or execute commands over SSH (SCP using SFTP)
S3 Plugin
— Upload build artifacts to Amazon S3
SCP plugin
— This plugin uploads build artifacts to repository sites using SCP (SSH) protocol.
Hudson Helper for Android
— Monitor your CI builds right from your Android device.
Hudson Mobi, the iPhone, iPod and Android client for Hudson CI
— The iPhone, iPod and iPad client for Hudson CI monitoring on the road.
Hudson Monitor for Android
— Monitor and display the status of your builds on your Android™ phone.
External site/tool integrations
Jira Issue Updater Plugin
— This is a Jenkins plugin which updates issues in Atlassian Jira (by changing their status and adding a comment) as part of a Jenkins job.
JIRA Plugin
— This plugin integrates Atlassian JIRA to Jenkins.
ChuckNorris Plugin
— Displays a picture of Chuck Norris (instead of Jenkins the butler) and a random Chuck Norris 'The Programmer' fact on each build page.
UI plugins
Active Directory plugin
— With this plugin, you can configure Jenkins to authenticate the username and the password through Active Directory.
Audit Trail Plugin
— Keep a log of who performed particular Jenkins operations, such as configuring jobs.
JClouds Plugin
— This plugin uses JClouds to provide slave launching on most of the currently usable Cloud infrastructures.
Checkstyle Plugin
— This plugin generates the trend report for Checkstyle, an open source static code analysis program.
FindBugs Plugin
— This plugin generates the trend report for FindBugs, an open source program which uses static analysis to look for bugs in Java code.
JIRA Plugin
— This plugin integrates Atlassian JIRA to Jenkins.
M2 Release Plugin
— This plugin allows you to perform a release build using the maven-release-plugin from within Jenkins.
PMD Plugin
— This plugin generates the trend report for PMD, an open source static code analysis program.
Meme Generator Plugin
— Generate Meme images when a build fails (and returns to stable), and post them on the project page.