香港六合彩

830 views

Published on

怎么了?,说:逗你玩儿的了然后香港六合彩的眼圈又红起来,低下

头说:你还这么关心我干嘛?我已经有男朋友了

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
830
On SlideShare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

香港六合彩

  1. 1. Setting up the Grouper and Signet Databases Joy Veronneau Cornell University Identity Management November 7, 2006
  2. 4. Introduction <ul><li>Grouper and Signet rely on Hibernate technology to integrate with a variety of RDBMS systems. </li></ul><ul><li>Also see the Signet and Grouper Wikis for Hibernate configuration information. </li></ul>
  3. 5. Let’s talk about first…
  4. 6. grouper.hibernate.properties <ul><li>See sample grouper/conf/grouper.hibernate.properties in Appendix 2 of handout. </li></ul><ul><li>Comes pre-populated for HSQLDB, PostgreSQL, and Oracle - just comment and uncomment the appropriate sections. </li></ul><ul><li>Hibernate uses JDBC - fill in: </li></ul><ul><ul><li>hibernate.connection.driver_class (JDBC driver classname) </li></ul></ul><ul><ul><li>hibernate.connection.url (JDBC URL for the database) </li></ul></ul><ul><ul><li>hibernate.connection.username (database user) </li></ul></ul><ul><ul><li>hibernate.connection.password (database user’s password) </li></ul></ul>
  5. 7. Grouper/Oracle Example <ul><li>At Cornell, we are using an Oracle database for the groups registry. </li></ul>
  6. 8. Grouper/Oracle cont’d <ul><li>Remember to uncomment this line if you are using Oracle: </li></ul>(You can also fix any spelling mistakes you might find.)
  7. 9. Ready, Set … <ul><li>If your configuration is ready, the next thing you need to do is initialize your database. </li></ul><ul><li>Don’t forget to put your classes.jar file in the grouper/lib directory (e.g. oracle-classes12.jar) </li></ul><ul><li>You may want to edit your log4j.properties file if you haven’t already. </li></ul>
  8. 10. Go! <ul><li>Switch into the grouper directory and type “ant schemaexport” - this command generates the DDL (Data Definition Language) appropriate for your configured RDBMS and installs the tables. </li></ul><ul><li>Then type “ant db-init”. This command populates various tables with required logical schema information and creates the root naming stem of the Groups Registry. </li></ul><ul><li>These ant commands will produce errors if you haven’t configured your log files correctly in log4j.properties. But the commands will still work after Grouper complains a little. </li></ul>
  9. 11. Grouper FAQ Number 2: <ul><li>Q: &quot;ant schemaexport&quot; creates 14 tables, 2 of which are &quot;subject&quot; and &quot;subjectattribute&quot;. Do I need these? </li></ul><ul><li>A: No. They are there only to support the quickstart demo and testing the API. They can safely be removed or ignored *if* your subjects are coming from another source, e.g. an LDAP directory. </li></ul>
  10. 12. Grouper FAQ Number 6: <ul><li>Q: I am using Oracle for my Grouper database, and when I try to add more groups or members, I am getting this error: &quot;hibernate commit error: Could not execute JDBC batch update.&quot; What causes that? </li></ul><ul><li>A: One cause may be that you have run out of tablespace - try extending your tablespace for the Grouper database. </li></ul><ul><li> Cornell currently has the tablespace set to 1Gb, just a rough guess based on preliminary data loads. </li></ul>
  11. 13. Grouper/Oracle cont’d <ul><li>The Oracle database schema has been modified between version 1.0 and 1.1 of Grouper. If you are upgrading from 1.0, you should export the GROUPER_MEMBERSHIPS table, reorder the columns and import the GROUPER_MEMBERSHIPS table for much better performance. </li></ul>
  12. 14. Audience Participation <ul><li>Any experience using Grouper with PostgreSQL or HSQLDB? </li></ul>
  13. 15. Special Grouper Subjects: GrouperAll <ul><li>The GrouperAll subject is hard-wired. </li></ul><ul><li>GrouperAll means *any* subject. </li></ul><ul><li>When you select “Assign the following default privileges for everyone” in the UI, you are actually assigning them to the “GrouperAll” subject. </li></ul><ul><li>You will see GrouperAll appear in the UI when you look at who has group privileges such as VIEW and READ. </li></ul>
  14. 17. Special Grouper Subjects: GrouperSystem <ul><li>The super-user… </li></ul><ul><li>If you are using an SSO system and/or outside subject sources, you probably won’t be able to sign on as GrouperSystem but… </li></ul><ul><li>You can create a Grouper “wheel” group whose members are the security equivalent to “GrouperSystem”. </li></ul><ul><li>If you are a member of the “wheel” group, the UI gives you a choice whether to act as yourself with normal privileges, or as “admin” which means “GrouperSystem”. </li></ul>
  15. 18. Setting up the Grouper Wheel Group <ul><li>See instructions in the Wiki Documentation section: “Initializing Administration of Grouper Privileges.” </li></ul><ul><li>Use gsh to create the group, and edit the grouper.properties file. </li></ul><ul><li>Sample grouper.properties file in Appendix 4 of handout. </li></ul><ul><li>Joy sez: “Make a script, you will have to do this more than once when you are starting out!” </li></ul>
  16. 19. The gsh Utility (Grouper Shell) <ul><li>My favorite utility - a tool for interacting with the Grouper API. </li></ul><ul><li>Script (batch) and interactive modes. </li></ul><ul><li>The Grouper Wiki has instructions for how to build and use it. </li></ul><ul><li>Use special gsh commands or *any* API command. </li></ul>
  17. 20. Useful gsh Variables
  18. 21. Create “wheel” Group - Sample gsh Script
  19. 22. Grouper XML Export <ul><li>Exported XML may be used for: </li></ul><ul><li> * provisioning other systems </li></ul><ul><li> * reporting </li></ul><ul><li> * backups </li></ul><ul><li> * switching database backends - including to upgraded schemas (required by new Grouper API versions) in the same database </li></ul>
  20. 23. Grouper XML Import <ul><li>Useful for: </li></ul><ul><li> * loading - adding to or updating existing Stems, Groups and Group Types. Whole or partial Grouper registries can be exported, and subsequently imported at a specified Stem (or the Root Stem if not specified) in the new instance. </li></ul><ul><li> * initializing a new, empty registry to a known state - useful for demos, testing and system recovery </li></ul>
  21. 24. Sample Grouper XML export command <ul><li>Remember to create an export.properties file. </li></ul><ul><li>From grouper directory, this will export the cu:ga stem which has the wheel group in it: </li></ul><ul><li>ant xml-export -Dcmd=&quot;GrouperSystem -name cu:ga x.xml&quot; </li></ul>
  22. 25. What the Export xml Looks Like
  23. 26. Setting up the Database
  24. 27. Set Up the Signet Database <ul><li>Instructions on the Signet Wiki </li></ul><ul><li>The DDL for each supported database is found in the signet/sql directory. </li></ul><ul><li>Signet currently provides DDL for: </li></ul><ul><li> * HSQL </li></ul><ul><li> * Oracle </li></ul><ul><li> * Postgres </li></ul><ul><li> * Sybase </li></ul><ul><li>Execute with your favorite tool (Aqua for Mac, dbArtisan for Windows) </li></ul>
  25. 28. Copy Your Driver <ul><li>For Oracle this is oracle-classes12.jar </li></ul><ul><li>An appropriate driver must be installed in two places, as there are two parts to Signet that operate independently - the Web application and the utilities. </li></ul><ul><ul><li>* signet/lib </li></ul></ul><ul><ul><li>* signet/webapp/signet/WEB-INF/lib </li></ul></ul>
  26. 29. Two Different Versions of Hibernate? <ul><li>It’s just an accident that Signet uses XML for the Hibernate configuration and Grouper doesn’t. </li></ul><ul><li>Currently Grouper (& Subject) use v2.1.8 of Hibernate. Signet uses some earlier v2. </li></ul><ul><li>Normalization of third party libraries common to Signet and Grouper is being addressed. </li></ul>
  27. 30. Edit signet/config/hibernate.cfg.xml <ul><li>See sample hibernate.cfg.xml in Appendix 3 of handout. </li></ul><ul><li>Configures your JDBC connection. </li></ul><ul><li>Edit two copies of the hibernate.cfg.xml file: </li></ul><ul><ul><li>signet/config/hibernate.cfg.xml </li></ul></ul><ul><ul><li>signet/webapp/signet/WEB-INF/classes/hibernate.cfg.xml </li></ul></ul>
  28. 31. Sample signet/config/hibernate.cfg.xml for Oracle
  29. 32. The Special “Signet” Subject <ul><li>Built into Signet </li></ul><ul><li>The Signet subject is the source of granted privileges over internal Signet system actions as described below. </li></ul><ul><li>The Signet subject is the actor on any system-initiated action, e.g., it will be identified as the &quot;revoker&quot; when a lifecycle event (expiration or affiliation change) causes the automatic revocation of services. </li></ul>
  30. 33. “Signet” Subject - more <ul><li>The Signet subject has hard-wired granting powers over all functions in all subsystems. Note that Signet can extend capabilities to others (can grant), but cannot itself act on those privileges. </li></ul>
  31. 34. Giving the Signet System Administrator Initial Power <ul><li>Use the Signet proxy tool to grant System Administrator privileges (described in the Wiki) </li></ul><ul><li>./run.sh grant [email_address] </li></ul><ul><li>Possible commands: grant, revoke, list </li></ul>

×