summaryrefslogtreecommitdiff
path: root/perl/t/server.t
AgeCommit message (Collapse)Author
2013-03-27Allow owners of objects to destroy them by defaultRuss Allbery
Owners of wallet objects are now allowed to destroy them. In previous versions, a special destroy ACL had to be set and the owner ACL wasn't used for destroy actions, but operational experience at Stanford has shown that letting owners destroy their own objects is a better model. Change-Id: I0e97d7a000e62cf5321add7b44140db6edc6769f Reviewed-on: https://gerrit.stanford.edu/973 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2013-01-31Renamed dbh subroutines and variables for clarityJon Robertson
In moving from DBI to DBIx::Class, we at first left the various variables the same. This goes through to update them for the proper names. * Wallet::Admin::schema was created to return the schema object (and similarly for Wallet::Server and Wallet::Report). * Wallet::Admin::dbh was modified to return the actual DBI handle again (and similarly for Wallet::Server and Wallet::Report). * Various places that used $admin->{dbh} were moved to $admin->{schema}. * Various places using $dbh for the schema object were changed to $schema. Change-Id: I00914866e9a8250855a7828474aa9ce0f37b914f Reviewed-on: https://gerrit.stanford.edu/733 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2013-01-30Moved the Perl wallet modules and tests to DBIx::ClassJon Robertson
Moved all the Perl code to use DBIx::Class for the database interface. This includes updating all database calls, how the schema is generated and maintained, and the tests in places where some output has changed. We also remove the schema.t test, as the tests for it are more covered in the admin.t tests now. Change-Id: Ie5083432d09a0d9fe364a61c31378b77aa7b3cb7 Reviewed-on: https://gerrit.stanford.edu/598 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2012-11-04Add new acl check commandRuss Allbery
Add a new acl check command which, given an ACL ID, prints yes if that ACL already exists and no otherwise. This is parallel to the check command for objects. Also fix some documentation errors in the wallet client documentation, saying that the check command doesn't require any ACL and fixing one place where "show" was used instead of "store".
2011-06-20Add a comment field to objectsRuss Allbery
Add a comment field to objects and corresponding commands to wallet-backend and wallet to set and retrieve it. The comment field can only be set by the owner or wallet administrators but can be seen by anyone on the show ACL.
2010-03-05Allow naming policy enforcement for ACL namesRuss Allbery
Wallet::Config now supports an additional local function, verify_acl_name, which can be used to enforce ACL naming policies. If set, it is called for any ACL creation or rename and can reject the new ACL name.
2010-03-03Verify that an ACL to be deleted is not referencedRuss Allbery
When deleting an ACL on the server, verify that the ACL is not referenced by any object first. Database referential integrity should also catch this, but not all database backends may enforce referential integrity. This also allows us to return a better error message naming an object that's still using that ACL.
2010-03-03Remove file names from test file headersRuss Allbery
Coding style update. Don't prefix the file short description with the file name; it's not needed.
2010-01-07Added ACL name to object history entriesJon Robertson
When listing an object history, ACLs were only shown as the ACL id. This changes that behavior to show the ACL name as well as ID. Where before it might say "set owner to 1", now it would say "set owner to ADMIN (1)".
2009-06-09Remove Subversion Id stringsRuss Allbery
2008-02-13Move register_object and register_verifier into Wallet::Admin.Russ Allbery
2008-02-07Add a new autocreate API call that tries to create an object using theRuss Allbery
default ACLs. Remove autocreation support from create, which now requires that one be on the ADMIN ACL, and from get and store. The wallet client will soon know how to do the right thing.
2008-02-07Add a check command to the wallet server to determine whether an objectRuss Allbery
already exists.
2008-02-06Check naming policy on wallet object creation before checking theRuss Allbery
default ACLs to avoid creating and stranding an ACL when the naming policy check fails.
2008-01-23Add a destroy() method to the Wallet::Admin object and use that insteadRuss Allbery
of Wallet::Schema::drop in the test suite.
2008-01-23Refactor database initialization into a new Wallet::Admin module.Russ Allbery
2008-01-17Support enforcing a naming policy for wallet objects via a PerlRuss Allbery
function in the wallet server configuration file.
2007-12-07Test the interaction of the ADMIN ACL with autocreate on get.Russ Allbery
2007-12-05Determine the class for object and ACL schema implementations from theRuss Allbery
database rather than a hard-coded list and provide Wallet::Schema methods for adding new class mappings. Add a missing class mapping for the netdb ACL schema verifier.
2007-12-01Expiration dates are now expressed in YYYY-MM-DD HH:MM:SS instead ofRuss Allbery
seconds since epoch and returned the same way. Timestamps are now stored in the database as correct date and time types rather than seconds since epoch to work properly with MySQL.
2007-12-01The wallet backend test suite now supports using a database other thanRuss Allbery
SQLite for testing. Also start a new Util.pm module for the test suite and move the contents sub into that module. More to follow.
2007-11-30Initial work on supporting testing with MySQL.Russ Allbery
Add a drop() method to Wallet::Schema to destroy the wallet database. Add a test suite for it. Add a reinitialize() method to Wallet;:Server that drops the database before creating it. Modify the wallet object test cases to call reinitialize() to create the initial database and drop() to clean up the database after the test is complete. Fix a bug preventing Wallet::Schema from being initialized multiple times. We now stash the schema in a class static variable and reuse it for subsequent initializations, since re-reading DATA doesn't work.
2007-11-20Attempt to create the object with a default owner on get and storeRuss Allbery
when the object doesn't exist.
2007-11-20Add support for running a user-defined function whenever an object isRuss Allbery
created by a non-ADMIN user and using the default owner ACL returned by that function provided that the calling user is authorized by that ACL. This permits dynamic creation of new objects based on a default owner ACL programmatically determined from the name of the object.
2007-10-11Add an acl_history method to the server layer and test it.Russ Allbery
2007-10-10Add tests for the history method and its ACLs.Russ Allbery
2007-10-05Add comprehensive license information in LICENSE and update the copyrightRuss Allbery
and license statements in all files. Make sure that some files that were missing copyright information now have them. Reference LICENSE rather than README in all notices.
2007-09-20Take multiple values in the attr() method and convert it to a referenceRuss Allbery
to an array internally so that the callers don't have to be aware of the internal API.
2007-09-20Call attr() correctly when setting attributes, even if it doesn'tRuss Allbery
matter for this test.
2007-09-20Add support for attribute setting and retrieving to the high-levelRuss Allbery
interface with appropriate ACL support. Retrieving is controlled by the show ACL and setting is controlled by the store ACL, both falling back to owner.
2007-09-18Implement the locked flag.Russ Allbery
2007-09-18Flags are now displayed as part of show.Russ Allbery
2007-09-18Add flag_set and flag_clear to Wallet::Server.Russ Allbery
2007-09-17Add an acl_show() method to Wallet::Server that calls the underlying ACLRuss Allbery
show() method.
2007-09-17In show() for an object, call show() for each of the ACLs on that objectRuss Allbery
and append that information to the object description.
2007-09-01Test a couple more ADMIN ACL manipulation cases.Russ Allbery
2007-09-01Test another case around the ADMIN ACL.Russ Allbery
2007-09-01Add some additional safeguards to ensure that users cannot destroy,Russ Allbery
rename, or remove the last entry from the ADMIN ACL. Add full documentation for Wallet::Server.
2007-08-31Check handling of invalid database configuration and failure to connectRuss Allbery
to the database.
2007-08-31You don't have to explicitly load the driver module for DBI.Russ Allbery
2007-08-30Finish the test suite. This should now be fairly comprehensive.Russ Allbery
2007-08-30Checkpoint. Add tests for basic object operations.Russ Allbery
2007-08-30Initial test suite for the Wallet::Server interface. Right now, justRuss Allbery
checks the ACL management functions.