summaryrefslogtreecommitdiff
path: root/perl/Wallet/Object
AgeCommit message (Collapse)Author
2014-07-11Switch to Module::Build for the Perl moduleRuss Allbery
The wallet server now requires Perl 5.8 or later (instead of 5.006 in previous versions) and is now built with Module::Build instead of ExtUtils::MakeMaker. This should be transparent to anyone not working with the source code, since Perl 5.8 was released in 2002, but Module::Build is now required to build the wallet server. It is included in some versions of Perl, or can be installed separately from CPAN, distribution packages, or other sources. Also reorganize the test suite to use subdirectories. Change-Id: Id06120ba2bad1ebbfee3d8a48ca2f25869463165 Reviewed-on: https://gerrit.stanford.edu/1530 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2014-07-11Add some missing stopwords in POD documentationRuss Allbery
Change-Id: Ieb29af8a3bcf61cdebb1d8b7b2a5b8868a3586dc Reviewed-on: https://gerrit.stanford.edu/1524 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2014-07-11Add new object type for Duo integrationsRuss Allbery
A new object type, duo (Wallet::Object::Duo), is now supported. This creates an integration with the Duo Security cloud multifactor authentication service and allows retrieval of the integration key, secret key, and admin hostname. Currently, only UNIX integration types are supported. The Net::Duo Perl module is required to use this object type. New configuration settings are required as well; see Wallet::Config for more information. To enable this object type for an existing wallet database, use wallet-admin to register the new object. Change-Id: I2c0dac75e81f526b34d6b509c4bdaecb43dd4a9d Reviewed-on: https://gerrit.stanford.edu/1516 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2014-04-13Change my email address to eagle@eyrie.orgRuss Allbery
Change-Id: I4c2b5d7c807d6c27dd18a3b92eef66d21287d21e Reviewed-on: https://gerrit.stanford.edu/1481 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2013-04-16Fix several bugs in Wallet::Object::Keytab enctype handlingRuss Allbery
There was a missing resultset() call in one place and the wrong resultset used in a different place, causing the enctype management code to not work. Change-Id: I796169c5968ec164f90f3cd75541dd346dd50fdf Reviewed-on: https://gerrit.stanford.edu/1070 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2013-02-27Use correct form of Stanford's copyright statementRuss Allbery
Change-Id: I06dd9ecca19315179bdd34d4b301548fe7604331 Reviewed-on: https://gerrit.stanford.edu/842 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-31Fixed errors with Keytab object and its testsJon Robertson
perl/Wallet/Object/Keytab.pm was using the wrong value for the database handle in some places (trying to load as a subroutine rather than part of the object). Also, the keytab.t tests were attempting to run against the DBIx::Class object rather than a direct dbh handle that they expected. Change-Id: Ifbb8b110d559f3ba867fc5b0dc3933fd2d4fd484 Reviewed-on: https://gerrit.stanford.edu/731 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>
2013-01-16Fix a few random errors in the WAKeyring object implementationRuss Allbery
Be sure that we don't purge keys if that would leave us with fewer than three keys. Fix a few other error reporting issues and one syntax error in a WebAuth call. Change-Id: I9bb75de56da3542f8c26ca8eab0814afea06c16a Reviewed-on: https://gerrit.stanford.edu/714 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2013-01-16In Wallet::Object::WAKeyring, require the right version of WebAuthRuss Allbery
We need at least version 3.06 to have the encode and decode WebAuth::Keyring functions. Change-Id: Ia4e3ed74cc038c06e3ba6ab13b37ea3cdb06c032 Reviewed-on: https://gerrit.stanford.edu/713 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2013-01-16Add Wallet::Object::WAKeyring documentationRuss Allbery
Change-Id: I12e430acd089de5ac50f62ebbdeb869be31eeeec Reviewed-on: https://gerrit.stanford.edu/711 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2012-11-04Add stopwords for the preliminary Wallet::Object::WAKeyring docsRuss Allbery
2012-08-30Fix POD stopwords and formattingRuss Allbery
Fix a formatting error in Wallet::ACL::LDAP::Attribute and add new stopwords required by the latest aspell.
2012-08-30In show, handle undefined columnsRuss Allbery
Some database drivers, such as current SQLite, will return undef for a data column that is set to NULL instead of the empty string. Skip past those data columns without attempting to examine the length of the resulting data.
2012-08-07Initial implementation of WebAuth keyring objectsRuss Allbery
This is very preliminary. There is no test suite yet, no documentation, and the test suite currently doesn't pass for other reasons.
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-03Use L<> links instead of man page references for modulesRuss Allbery
Do this only in the main text, not in the SEE ALSO section, since the latter is more for conventional man pages. This will produce better results for some POD to HTML converters (although not mine, yet).
2010-02-20Update documentation for support for storing nul dataRuss Allbery
Update the wallet client, wallet-backend, and Wallet::Object::File documentation for the support for storing data containing nul characters using the new stdin support in remctld. Add this to NEWS.
2010-02-18Refactor Wallet::Kadmin keytab_rekey to return keytabRuss Allbery
Change the API for keytab_rekey to match keytab, returning the keytab as data instead of writing it to a file. This simplifies the wallet object implementation and moves the logic for reading the temporary file into Wallet::Kadmin and its child classes. (Eventually, there may be a kadmin backend that doesn't require using a temporary file.) Setting KEYTAB_TMP is now required to instantiate either the ::MIT or ::Heimdal Wallet::Kadmin classes.
2010-02-18Support unchanging keytabs with Heimdal without remctlRuss Allbery
Heimdal supports retrieving a keytab containing the existing keys over the kadmin protocol. Move the support for using remctl to retrieve an existing keytab into Wallet::Kadmin::MIT and provide two separate methods in the Wallet::Kadmin interface: one which rekeys and one which doesn't. Implement the non-rekeying interface for Heimdal. Expand the test suite for the unchanging keytabs to include tests for the Heimdal method.
2010-02-18Refactor sync handling in Wallet::Object::KeytabRuss Allbery
Pull the sync code out into separate methods to avoid a really long and awkward attr method. Document the limited object support for the sync attribute.
2010-02-18Rename functions in Wallet::Kadmin APIRuss Allbery
Now that we support multiple versions of Kerberos, use generic names for the functions in the Wallet::Kadmin interface rather than the commands from the MIT kadmin interface.
2010-02-09Check spelling of server API POD and tweak server docsRuss Allbery
Also update the POD syntax check to the current version of that check I use elsewhere. Since I'm touching all the POD anyway, also rewrap all of the POD to 74 columns. Fix some references to MIT in the Wallet::Kadmin::Heimdal module documentation.
2010-02-09Remove kaserver synchronization support from the wallet backendRuss Allbery
Remove kaserver synchronization support. It is no longer tested, and retaining the code was increasing the complexity of wallet, and some specific requirements (such as different realm names between kaserver and Kerberos v5 and the kvno handling) were Stanford-specific. Rather than using this support, AFS sites running kaserver will probably find deploying Heimdal with its internal kaserver compatibility is probably an easier transition approach.
2010-02-08Coding style and whitespace fixesRuss Allbery
Combine a long series of eval blocks into a single block and a single error check. Remove trailing whitespace, and in some cases remove trailing () on method calls where the parens aren't useful.
2010-01-26Added way to clean things during a fork for kadminJon Robertson
The MIT kadmin module currently directly runs the MIT kadmin program. Some data needs to be cleaned during the forks for this. This provides a callback that can be registered and is called during the fork process, currently just to mark database handles inactive. It was added to both the MIT and Heimdal modules, though it's only a stub in the Heimdal module. Heimdal is not forking kadmin, but the stub is there in order to allow the caller to not care which module is being used and just always register the callbacks.
2010-01-26Improved error handling for Kadmin sub-modulesJon Robertson
Improved error handling by adding an error function to the Kadmin sub-modules which will copy errors down to the Wallet::Object::Keytab error function rather than relying on too many dies and evals. There still needs to be more cleanup here, but that will rely on work on Heimdal::Kadm5 as well, to clean up its own error handling to not spam warnings when called without RaiseError. Also caught a few more un-evaled error cases where Heimdal::Kadm5 was called, and fixed an error where RaiseErrors was being set rather than RaiseError due to an error in Heimdal::Kadm5 docs.
2010-01-21Removed valid_principal as a Kadmin API functionJon Robertson
valid_principal has been removed from Wallet::Kadmin and Wallet::Kadmin::Heimdal. An accessor for it in Wallet::Object::Keytab has also been removed, as have the tests in perl/t/keytab.t for the function. It still remains within Wallet::Kadmin::MIT and is used there, but only as a private method for flagging what the kadmin command-line interface cannot handle.
2010-01-19Coding style fixes for Perl wallet codeRuss Allbery
Strip trailing whitespace, convert tabs to spaces, add newlines to exceptions, and remove a few stray blank lines and a few other minor coding style oddities. Make the SQL style consistent.
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-12-16Provided path to call valid_principal directlyJon Robertson
valid_principal used to reside in Wallet::Object::Keytab, but was moved to the individual Wallet::Kadmin::* modules. This isn't necessary currently and may not ever be, but it's there just in case we do ever need to differentiate. To simplify testing, a way to still call it directly from Wallet::Object::Keytab has been added.
2009-12-10Added support for Heimdal KDCJon Robertson
Added support for Heimdal as an alternative to MIT Kerberos. This involved separating out the kadmin-specific code into its own set of modules, and changing the existing Wallet::Object::Keytab code to branch based on which module is loaded.
2009-06-09Remove Subversion Id stringsRuss Allbery
2008-02-20Report the correct error message when addprinc fails while creating aRuss Allbery
keytab object.
2008-02-09Actually implement FILE_MAX_SIZE.Russ Allbery
2008-02-09Add file object support to the wallet server.Russ Allbery
2008-02-09Minor documentation fixes.Russ Allbery
2008-02-08No unnecessary ; after __END__.Russ Allbery
2008-02-07The current version of Net::Remctl can't handle explicit undef or theRuss Allbery
empty string as a principal argument. Be careful not to provide a principal argument if no principal was set. This workaround can be removed once we depend on a later version of Net::Remctl.
2008-01-22Update documentation for the API to Wallet::Object::Base andRuss Allbery
Wallet::ACL to take Wallet::Database objects instead of database handles.
2008-01-22Add a Wallet::Database class that now holds the database connection codeRuss Allbery
previously in Wallet::Server. Remove all the attribute setting on database handles in the other classes since Wallet::Database handles that initialization.
2007-12-07Get rid of more return undefs.Russ Allbery
2007-12-07Bump version numbers appropriately.Russ Allbery
2007-12-06Fix the keytab principal validation regex to allow instancesRuss Allbery
containing periods. Otherwise, it's hard to manage host keytabs. Add a missing test suite for that method.
2007-12-05Various coding style fixes and cleanup based on a much-appreciatedRuss Allbery
code audit by Simon Cozens. I didn't take all of his advise, and he shouldn't be blamed for any remaining issues.
2007-12-05Coding style improvements.Russ Allbery
2007-12-01Following the DBI documentation, turn on AutoCommit after RaiseError soRuss Allbery
that we have some hope of getting error messages if it fails.
2007-12-01Set InactiveDestroy to the right thing. Doh.Russ Allbery
2007-12-01Make sure we always have a valid object and access to our databaseRuss Allbery
handle when calling kadmin so that we can do our database handle mangling.