diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-01-13 14:29:16 -0500 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2011-01-14 14:26:22 -0500 |
commit | c69d8084c17c5d94240bda9447ed9546159608a5 (patch) | |
tree | cbb69cb18d98ddea93c0bd1ea1c706026d0fe94e /BUILD.txt | |
parent | c94d20cfd8cc1bd8cd8152b19d6807b654286197 (diff) | |
download | freeipa.git-c69d8084c17c5d94240bda9447ed9546159608a5.tar.gz freeipa.git-c69d8084c17c5d94240bda9447ed9546159608a5.tar.xz freeipa.git-c69d8084c17c5d94240bda9447ed9546159608a5.zip |
Add API version and have server reject incompatible clients.
This patch contains 2 parts.
The first part is a small utility to create and validate the current
API. To do this it needs to load ipalib which on a fresh system
introduces a few problems, namely that it relies on a python plugin
to set the default encoding to utf8. For our purposes we can skip that.
It is also important that any optional plugins be loadable so the
API can be examined.
The second part is a version exchange between the client and server.
The version has a major and a minor version. The major verion is
updated whenever existing API changes. The minor version is updated when
new API is added. A request will be rejected if either the major versions
don't match or if the client major version is higher than then server
major version (though by implication new API would return a command not
found if allowed to proceed).
To determine the API version of the server from a client use the ping
command.
ticket 584
Diffstat (limited to 'BUILD.txt')
-rw-r--r-- | BUILD.txt | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -67,6 +67,25 @@ Some tests may be skipped. For example, all the XML-RPC tests will be skipped if you haven't started the lite-server. The DNS tests will be skipped if the underlying IPA installation doesn't configure DNS, etc. +API.txt +------- +The purpose of the file API.txt is to prevent accidental API changes. The +program ./makeapi creates file and also validates it (with the --validate +option). This validation is part of the build process. + +There are three solutions to changes to the API: + +1. Changes to existing API require a change to the MAJOR version. +2. Addition of new API requires a change to the MINOR version. +3. Or just back out your changes and don't make an API change. + +If the API changes you'll need to run ./makeapi to update API.txt and +commit it along with VERSION with your API change. + +If a module is optionally loaded then you will need to be able to +conditionally load it for API validation. The environment variable +api.env.validate_api is True during validation. + General Notes ------------- IPA is not relocatable. |