Apache Shiro design is intuitive and a simple way to ensure the safety of the application…

Short Description:

Apache Shiro’s design goals are to simplify application security by being intuitive and easy to use…


Apache Shiro design is intuitive and simple way to ensure the safety of the application.

Software design is generally based on user stories to achieve, that is, based on how users interact with the system to design the user interface or service API. For example, a user story will be displayed after a user logs on a button to view personal account information, if the user is not registered, it displays a registration button.

This user story implies major application user needs to be accomplished. Even if the user is not a person here, but third-party systems, when coding is also interacting with the system as “user” to deal with.

Apache Shiro reaction of this concept in their design by the intuitive notion exposed to developers so that Apache Shiro in almost all applications are easy to use.


Shiro has three main top-level concept: Subject, SecurityManager, Realms. The following diagram describes the interactions between these concepts, the following will introduce 11 to do.




Subject is a microcosm of the current user in the security field. User usually implied meaning people, and Subject can be people, may be a third-party service, the guardian accounts, corn operation. Or any interaction with the system can be called Subject. Subject all instances must be bound to a SecurityManager, so that when interacting with the Subject, in fact, has been transformed into this SecurityManager Subject associated interact.


SecurityManager Shiro as the core framework, as in the form of “umbrella” object exists, it coordinated its internal security components forming an object graph. Upon the completion of its internal configuration SecurityManager and objects in the application, SecurityManager will take a back seat, developers use most of the time in the Subject API. Then-depth understanding of SecurityManager, Again: When interaction with the Subject, in fact, hidden behind heavy Subject SecurityManager responsible for safe operation. This point in the above figure also reflected.


Realms as a bridge Shiro and security applications between data sources or connectors. When you need to get the user accounts for authentication (login) or authorization (access control), Shiro will find in the application configuration is responsible for this work Realm (one or more) to obtain complete data security. In this sense, Realm is essentially a security-related Dao: It encapsulates the details of the data source of the link, and provide data in accordance with the needs of Shiro. When you configure Shiro, the authentication and authorization to provide at least one Reaml. You can configure multiple Realm, but at least one. Shiro built a number of security can be connected to a data source Realm, such as LDAP, relational databases (JDBC), similar to the INI text configuration files resources and properties. If the built-in Realm can not meet the demand, you can also use the custom data source on behalf of their own Realm implementation. And other internal components, like, SecurityManager management Realm how to obtain related Subject security and identity information.

The following figure shows the core concepts Shiro framework, followed by a brief description will be made eleven:

3 thoughts on “Apache Shiro design is intuitive and a simple way to ensure the safety of the application…

  1. It抯 really a nice and helpful piece of information. I抦 glad that you shared this useful info with us. Please keep us informed like this. Thanks for sharing.

  2. Thanks for discussing your ideas. I’d personally also like to convey that video games have been ever evolving. Modern tools and enhancements have served create realistic and fun games. Most of these entertainment video games were not as sensible when the concept was first being attempted. Just like other designs of technological innovation, video games as well have had to evolve by way of many decades. This is testimony on the fast development of video games.

  3. I do not even understand how I finished up right here, however I thought this publish was once good. I do not recognise who you’re however definitely you are going to a well-known blogger in case you are not already 😉 Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *