summaryrefslogtreecommitdiffstats
path: root/spec/unit
Commit message (Collapse)AuthorAgeFilesLines
...
* | Adding an SSl::Inventory class for managing the ssl inventory.Luke Kanies2008-04-181-0/+136
| | | | | | | | | | This models the existing Inventory module in the sslcertificates/ directory, but does so as an instance, rather than a module.
* | All SSL terminus classes now force the CA information into the right place.Luke Kanies2008-04-182-0/+18
| | | | | | | | | | | | | | | | | | Without this, then you could end up duplicating your CA key into the normal directory depending on how caching was set up. Again, this design aspect isn't the most straightforward, but at least it's functional now.
* | Switching the SSL::Host class to return Puppet instances.Luke Kanies2008-04-173-27/+37
| | | | | | | | | | | | | | | | | | Previously, the class was returning OpenSSL instances (e.g, OpenSSL::X509::Certificate) instead of Puppet instances (e.g., Puppet::SSL::Certificate). This made some things easier, but it made them asymmetric (e.g., you assigned the key as a Puppet instance but got back an OpenSSL instance), and it also reduced your flexibility and introspectiveness.
* | Setting the expiration date of certificate objects to the expiry of the actualLuke Kanies2008-04-171-0/+15
| | | | | | | | cert.
* | Adding integration tests for a lot of the SSL code.Luke Kanies2008-04-173-7/+7
| | | | | | | | | | This flushed out some problems, and things mostly look good now, but I don't think we're quite there yet.
* | Moving the password file handling into the SSL::Key class.Luke Kanies2008-04-173-32/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was necessary because when the Indirector is used, there isn't necessarily enough context available to know when a password file should be used (e.g., when reading a Key from disk, you don't know if that key was encrypted). Now, the Key class automatically uses the right password file, and only tries to use those files that actually exist. This isn't very flexible, in that it only allows one CA file and one non-CA file, but no one really uses anything but the CA file anyway.
* | Moving all of the ca-specific settings to the ca_fileLuke Kanies2008-04-174-18/+43
| | | | | | | | | | | | | | | | terminus classes, rather than the normal :file classes. This is unfortunately complicated, and it means that the Key :ca_file is only ever actually used for retrieving the CA key itself.
* | Adding SSL::Host-level support for managing the terminus andLuke Kanies2008-04-175-7/+111
| | | | | | | | | | cache classes. Also, defaulting to the :file terminus for all of the SSL classes.
* | Fixing the CA so it actually automatically generates its certificate.Luke Kanies2008-04-171-12/+11
| |
* | The certificate authority now uses a Host instance named 'ca'.Luke Kanies2008-04-171-90/+57
| | | | | | | | | | | | It previously was a subclass of Host, but this should make it easier to separate between the thing doing the signing and the thing managing the necessary files.
* | Changing all of the SSL terminus classes to treat CA files specially.Luke Kanies2008-04-177-120/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a kind of weird design situation. For instance, we've got a collection of certificates in the :certdir, but then there's a special CA certificate off by itself. Rather than build a whole separate infrastructure for managing those separate files (cert and key, at least), I decided to add special support for specifying where to find the CA-specific bits, and then code for handling them when necessary. This requires that we have a standard way of knowing whether we should be managing the CA bits or normal host files. The Puppet::SSL::Host class now has a 'ca_name' method that returns the string we're using for the CA name; this name is currently 'ca'. We have to use a name, because the name is the only thing that all methods have access to (e.g., when trying to 'find' the right cert, we only have the name available). What this means is that if you want access to the CA key or cert, then create a Puppet::SSL::Host instance with the name 'ca'. You'll still get the CA cert created with the host's :certname; it will just be stored in a different location.
* | The 'destroy' method for the ssl_file terminus base classLuke Kanies2008-04-161-2/+2
| | | | | | | | now returns false on missing files, rather than failing.
* | Marking a test as pending, because it's not ready yet.Luke Kanies2008-04-161-7/+7
| |
* | Removing all the cases where the ssl host specifiesLuke Kanies2008-04-161-128/+6
| | | | | | | | | | a terminus. Also, getting rid of some metaprogramming that wasn't really helping.
* | Making the first pass at using requests instead ofLuke Kanies2008-04-155-101/+17
| | | | | | | | | | specifying the terminus class. The individual ssl classes now work, but the ssl host class doesn't yet.
* | Adding a :to_text method that will convert the containedLuke Kanies2008-04-153-0/+21
| | | | | | | | thing to readable human text.
* | Actually signing the certificates in the CA.Luke Kanies2008-04-151-1/+39
| |
* | Adding the first attempt at managing the certificateLuke Kanies2008-04-151-0/+167
| | | | | | | | revocation list.
* | Adding a :search method to the ssl_file terminus typeLuke Kanies2008-04-152-0/+109
| | | | | | | | and the SSL::Host class.
* | Fixing a failing test that had not been updated from previous codingLuke Kanies2008-04-152-3/+1
| |
* | We have a basically functional CA -- it can signLuke Kanies2008-04-153-33/+132
| | | | | | | | | | | | requests and return certificates. There's still plenty more work to do, but I'm probably not much more than a day away from redoing puppetca to use this code.
* | Adding tests for the easy bits of the CertificateFactory.Luke Kanies2008-04-151-0/+107
| | | | | | | | | | | | I probably am going to skip the tests for the rest, since the code is unlikely to ever change, and it's going to be a royal pain to test.
* | Adding tests for the certificate serial numbersLuke Kanies2008-04-151-0/+184
| |
* | The certificate authority is now functional and tested.Luke Kanies2008-04-152-3/+122
| |
* | refactoring the cert request test a bitLuke Kanies2008-04-151-37/+29
| |
* | This is a first pass at the certificate authority.Luke Kanies2008-04-152-0/+31
| | | | | | | | | | The tests are basically entirely absent still, but the structure is all there.
* | It looks like all of the new ssl classes for managingLuke Kanies2008-04-155-55/+230
| | | | | | | | | | | | | | keys, certificates, and requests now work, including talking to the certificate authority. Now we just need the authority itself, along with the necessary REST terminii.
* | Adding he last of the indirection classes for the sslLuke Kanies2008-04-155-0/+66
| | | | | | | | classes, finally including the certificate requests.
* | The certificate and key are now correctly interactingLuke Kanies2008-04-153-216/+171
| | | | | | | | | | with the existing cert/key store. Certificate requests are not yet handled, nor are the ca-specific collections.
* | The basics for the certificate and certificate requestLuke Kanies2008-04-154-3/+177
| | | | | | | | | | indirection terminii are done. I need to move most of the test code to a shared behaviour now.
* | Fixing a couple of broken tests.Luke Kanies2008-04-151-0/+2
| |
* | The new SSL classes basically work, but they're notLuke Kanies2008-04-153-0/+174
| | | | | | | | functionally connected to any kind of indirection.
* | Finished the certificate request wrapper class.Luke Kanies2008-04-151-0/+68
| |
* | First stage of cert refactoring: PrivateLuke Kanies2008-04-153-116/+229
| | | | | | | | keys kind of work.
* | Adding the necessary tests for webrick to have logging andLuke Kanies2008-04-151-0/+145
| | | | | | | | | | ssl. The tests can't be completed until the certificate work is all done.
* | Merge branch '0.24.x'Luke Kanies2008-04-118-361/+697
|\| | | | | | | | | | | Conflicts: spec/unit/network/server.rb
| * Fixishing some pending tests, including filling inLuke Kanies2008-04-111-11/+9
| | | | | | | | the connection information.
| * Making the changes necessary to get the REST supportLuke Kanies2008-04-111-27/+35
| | | | | | | | | | to work with the current state of the indirection work, including using a request object and an expiration date.
| * The 'destroy' method in the indirection now returnsLuke Kanies2008-04-111-3/+3
| | | | | | | | | | the results of destroying, so they can return true or false.
| * fill out specs for network_* methods; refactor lowest-level network hooksRick Bradley2008-04-111-26/+158
| |
| * adding rest_connection_details helper to Indirector::REST -- will need to be ↵Rick Bradley2008-04-111-0/+12
| | | | | | | | overridden to lookup the real connection details
| * make sure unit indirector specs are working with #save; fill out network_put ↵Rick Bradley2008-04-111-3/+53
| | | | | | | | pending specs
| * updating mongrel/webrick unit tests to match integration-tested version of ↵Rick Bradley2008-04-112-22/+4
| | | | | | | | REST save functionality
| * adding REST save support, with integration tests. A handful of unit tests ↵Rick Bradley2008-04-111-2/+0
| | | | | | | | in that area now need to be updated.
| * Added support for destroy/DELETE over REST (including units & integrations ↵Rick Bradley2008-04-111-3/+56
| | | | | | | | | | | | | | | | on both webrick & mongrel). Added pending specs for the trivialities in the REST network_fetch and network_delete methods. Refactored YAML exception detection out into a private helper method.
| * updating search integration specs to include webrickRick Bradley2008-04-111-4/+4
| |
| * making search work over REST, w/ unit & integration specsRick Bradley2008-04-111-1/+1
| |
| * unit specs and implementation for Indirector::REST#search methodRick Bradley2008-04-111-8/+52
| |
| * Make mongrel happy like WEBrick.Rick Bradley2008-04-113-280/+270
| | | | | | | | Refactored specs to put some of the lower-level find/save/search/destroy unit tests under their own contexts.
| * Much larger commit than I would like to land at once. This is all ↵Rick Bradley2008-04-115-46/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REST-related code. Two specs are failing related to how Mongrel is initialized for REST; will fix those shortly. REST indirector now supports find, with deserialization. Network code in indirector now. Will still need to un-hardwire address/port for outbound connections. Will still need to urlencode path parameters. Code for search, destroy, update is coming, should be similar to find. Reworked how the Handler module is used. Needed to be included, rather than inherited. Needed to sidestep initializers for actual web servers (webrick, mongrel), needed to be possible to have handler-including class be used as a class (aka servlet) instead of as an instance. Webrick handler registration is now abstracted to "above" the servlet. Provided a #model method to use instead of @model in handler module. This allows neutering during testing. Brought class_for_protocol up into http/webrick class as a (tested) class method. Integration tests for rest indirection. Split server integration tests into mongrel and webrick tests. Got Node/REST working properly wrt the crazy-ass autoloader thing. We're now actually passing traffic w/ webrick, fwiw.