diff options
author | Endi S. Dewata <edewata@redhat.com> | 2010-10-07 14:02:44 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-10-12 14:17:24 -0400 |
commit | 1dc0a3ab3e145e0f8fdfd71a1205b546a906bd51 (patch) | |
tree | 767a8e704b54f7ef25ad8eac6713d2cd1caa9e8c /install/static/test/data | |
parent | 81fe26bdcfdfc1673d4c499eaa1183be1ccee281 (diff) | |
download | freeipa-1dc0a3ab3e145e0f8fdfd71a1205b546a906bd51.tar.gz freeipa-1dc0a3ab3e145e0f8fdfd71a1205b546a906bd51.tar.xz freeipa-1dc0a3ab3e145e0f8fdfd71a1205b546a906bd51.zip |
Certificate management for services.
This is an initial implementation of certificate management for
services. It addresses the mechanism required to view and update
certificates. The complete UI implementation will be addressed in
subsequent patches.
On the server side, the service.py has been modified to define
usercertificate in the service object's takes_params. This is
needed to generate the proper JSON metadata which is needed by
the UI. It also has been modified to accept null certificate for
deletion.
On the client side, the service details page has been modified to
display the base64-encoded certificate in a text area. When the
page is saved, the action handler will store the base64-encoded
certificate in the proper JSON structure. Also the service name
and service hostname are now displayed in separate fields.
The details configuration has been modified to support displaying
and updating certificates. The structure is changed to use maps
to define sections and fields. A section contains name, label,
and an array of fields. A field contains name, label, setup
function, load function, and save function. This is used to
implement custom interface and behavior for certificates.
All other entities, test cases, and test data have been updated
accordingly. Some functions and variables have been renamed to
improve clarity and consistency.
Diffstat (limited to 'install/static/test/data')
-rw-r--r-- | install/static/test/data/json_metadata.json | 25 | ||||
-rw-r--r-- | install/static/test/data/service_mod.json | 21 | ||||
-rw-r--r-- | install/static/test/data/service_show.json | 5 |
3 files changed, 51 insertions, 0 deletions
diff --git a/install/static/test/data/json_metadata.json b/install/static/test/data/json_metadata.json index 52be79882..4a732ac5f 100644 --- a/install/static/test/data/json_metadata.json +++ b/install/static/test/data/json_metadata.json @@ -2865,6 +2865,31 @@ "query": false, "required": true, "type": "unicode" + }, + { + "attribute": false, + "autofill": false, + "class": "Bytes", + "cli_name": "certificate", + "cli_short_name": null, + "default": null, + "doc": "Base-64 encoded server certificate", + "exclude": null, + "flags": [], + "hint": null, + "include": null, + "label": "Certificate", + "length": null, + "maxlength": null, + "minlength": null, + "multivalue": false, + "name": "usercertificate", + "pattern": null, + "pattern_errmsg": null, + "primary_key": false, + "query": false, + "required": false, + "type": "str" } ], "uuid_attribute": "ipauniqueid" diff --git a/install/static/test/data/service_mod.json b/install/static/test/data/service_mod.json new file mode 100644 index 000000000..f56186466 --- /dev/null +++ b/install/static/test/data/service_mod.json @@ -0,0 +1,21 @@ +{ + "error": null, + "id": 0, + "result": { + "result": { + "krbprincipalname": [ + "test/dev.example.com@DEV.EXAMPLE.COM" + ], + "managedby_host": [ + "dev.example.com" + ], + "usercertificate": [ + { + "__base64__": "MIICAjCCAWugAwIBAgICBAswDQYJKoZIhvcNAQEFBQAwKTEnMCUGA1UEAxMeSVBBIFRlc3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTEwMTAwNzIzMzk0NFoXDTE1MTAwNzIzMzk0NFowKDEMMAoGA1UECgwDSVBBMRgwFgYDVQQDDA9kZXYuZXhhbXBsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOTXyj8grVB7Rj95RFawgdwn9OYZ03LWHZ+HMYggu2/xCCrUrdThP14YBlVqZumjVJSclj6T4ACjjdPJq9JTTmx7gMizDTReus7IPlS6fCxb5v5whQJZsEksXL04OxUMl25euPRFkYcTK1rdW47+AkG10j1qeNW+B6CpdQGR6eM/AgMBAAGjOjA4MBEGCWCGSAGG+EIBAQQEAwIGQDATBgNVHSUEDDAKBggrBgEFBQcDATAOBgNVHQ8BAf8EBAMCBPAwDQYJKoZIhvcNAQEFBQADgYEASIhq723VL5xP0q51MYXFlGU1boD7pPD1pIQspD/MjCIEupcbH2kAo4wf+EiKsXR0rs+WZkaSgvFqaM4OQ2kWSFTiqmFXFDBEi6EFr68yLg7IpQpNTzVBXERd8B4GwNL9wrRw60jPXlUK29DPBsdGq8fDgX18l39wKkWXv7p1to4=" + } + ] + }, + "summary": "Modified service \"test/dev.example.com@DEV.EXAMPLE.COM\"", + "value": "test/dev.example.com@DEV.EXAMPLE.COM" + } +}
\ No newline at end of file diff --git a/install/static/test/data/service_show.json b/install/static/test/data/service_show.json index 30025eb76..7ab778e18 100644 --- a/install/static/test/data/service_show.json +++ b/install/static/test/data/service_show.json @@ -10,6 +10,11 @@ ], "managedby_host": [ "dev.example.com" + ], + "usercertificate": [ + { + "__base64__": "MIICAjCCAWugAwIBAgICBAswDQYJKoZIhvcNAQEFBQAwKTEnMCUGA1UEAxMeSVBBIFRlc3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTEwMTAwNzIzMzk0NFoXDTE1MTAwNzIzMzk0NFowKDEMMAoGA1UECgwDSVBBMRgwFgYDVQQDDA9kZXYuZXhhbXBsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOTXyj8grVB7Rj95RFawgdwn9OYZ03LWHZ+HMYggu2/xCCrUrdThP14YBlVqZumjVJSclj6T4ACjjdPJq9JTTmx7gMizDTReus7IPlS6fCxb5v5whQJZsEksXL04OxUMl25euPRFkYcTK1rdW47+AkG10j1qeNW+B6CpdQGR6eM/AgMBAAGjOjA4MBEGCWCGSAGG+EIBAQQEAwIGQDATBgNVHSUEDDAKBggrBgEFBQcDATAOBgNVHQ8BAf8EBAMCBPAwDQYJKoZIhvcNAQEFBQADgYEASIhq723VL5xP0q51MYXFlGU1boD7pPD1pIQspD/MjCIEupcbH2kAo4wf+EiKsXR0rs+WZkaSgvFqaM4OQ2kWSFTiqmFXFDBEi6EFr68yLg7IpQpNTzVBXERd8B4GwNL9wrRw60jPXlUK29DPBsdGq8fDgX18l39wKkWXv7p1to4=" + } ] }, "summary": null, |