1 / 16

EJB Security Management

Learn about the responsibilities of the enterprise bean class provider, bean provider, application assembler, and deployer in managing security for EJB. Understand how to declare security roles, specify method permissions, and link security role references to roles.

legaspi
Download Presentation

EJB Security Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EJB Security Management

  2. Security Management Overview • The enterprise bean class provider should not hard-code security policies and mechanisms into the business methods • allows appropriate deployment for the operational environment of the enterprise • The application assembler may define • security roles for an application • semantic grouping of permissions • method permissions for each security role • permission to invoke a specified group of methods

  3. System Admins Application Assembler Bean Provider Deployer E J B Groups Security Management Overview - 2 Method Permissions Security Roles Users

  4. Bean Provider’s Responsibilities • The bean provider should not implement security mechanisms or security policies in the enterprise beans’ business methods • rely instead on the security mechanisms provided by the EJB Container • It is possible, however, to programmatically access a Caller’s Security Context...

  5. Programmatically Accessing a Caller’s Security Context • Two methods allow the bean provider to access security information about the enterprise • bean’s caller • getCallerPrincipal • isCallerInRole • In general, security management should be enforced by the container • the security API should is used infrequently

  6. Declaring Security Roles • Security roles are declared in the deployment descriptor • ... • <enterprise-beans> • <entity> • <ejb-name>WombatPayroll</ejb-name> • <ejb-class>com.wombat.PayrollBean</ejb-class> • <security-role-ref> • <description> • This security role should be assigned to the employees allowed to update employees’ salaries. • </description> • <role-name>payroll</role-name> • </security-role-ref> • </entity> • </enterprise-beans> • …

  7. Application Assembler’s Responsibilities • Define security roles in the deployment descriptor • Specify the methods of the remote and home interface that each security role is allowed to • invoke • Link declared security role references to security roles

  8. Specifying Security Roles • ... • <assembly-descriptor> • <security-role> • <description> • Allows employees to access their own information • </description> • <role-name>employee</role-name> • </security-role> • <security-role> • <description> • Allowed to view/update payroll entries for employees • </description> • <role-name>payroll-department</role-name> • </security-role> • ... • </assembly-descriptor>

  9. Method permissions • <method-permission> • <role-name>employee</role-name> • <method> • <ejb-name>WombatPayroll</ejb-name> • <method-name>findByPrimaryKey</method-name> • </method> • <method> • <ejb-name>WombatPayroll</ejb-name> • <method-name>getEmployeeInfo</method-name> • </method> • <method> • <ejb-name>WombatPayroll</ejb-name> • <method-name>updateEmployeeInfo</method-name> • </method> • </method-permission>

  10. Linking Security Role References to Security Roles • ... • <enterprise-beans> • <entity> • <ejb-name>WombatPayroll</ejb-name> • <ejb-class>com.wombat.PayrollBean</ejb-class> • <security-role-ref> • <description> • This security role should be assigned to the employees allowed to update employees’ salaries. • </description> • <role-name>payroll</role-name> • <role-link>payroll-department</role-link> • </security-role-ref> • </entity> • </enterprise-beans> • …

  11. Deployer’s Responsibilities • Ensures that an application is secure after it has been deployed in the operational environment • Assigns principals and/or groups of principals used for managing security in the operational environment to defined security roles • not specified in the EJB architecture! • specific to that operational environment • Can use the security view defined in the deployment descriptor merely as “hints”

  12. EJB Container Provider’s Responsibilities • The EJB container provider provides the implementation of the security infrastructure • A security domain can be implemented, managed, and administered by the EJB Server • e.g., the EJB Server may store X509 certificates • The EJB specification does not define the scope of the security domain • the scope may be defined by the boundaries of the application, EJB Server, operating system, network, or enterprise

  13. System Administrator’s Responsibilities • Typically responsible for • creating a new user account • adding a user to a user group • removing a user from a user group • removing or freezing a user account • Security domain administration is beyond the scope of the EJB specification...

  14. Proceed with Caution… EJB Server Vendor EJB Specification EIS Insecure Secure Threats

  15. Summary • The EJB architecture does not specify how an enterprise should implement its security architecture • assignment of security roles to the operational environment’s security concepts is specific to the operational environment • identification and authentication left to EJB Server vendor’s • Security will be vendor specific for some time • no plans to address problem in EJB 2.0

  16. References • [1] Java Authentication and Authorization Service (JAAS)http://java.sun.com/security/jaas/. • [2] Java Cryptography Extension (JCE) • http://java.sun.com/security/JCE1.2/spec/apidoc/index.html

More Related