Format of ipasshpubkey in users and hosts changed from BYTES to STR. Web UI no longer gets the value as base64 encoded string in an object.

Label was changed to reflect that the key don't have to be plain base64 encoded blob.

https://fedorahosted.org/freeipa/ticket/2989

Note: freeipa-jcholast-83-openssh-style-public-keys.patch should be applied
--
Petr Vobornik
From decfc911e3e37c7c21768a8cda6d741783e79a9d Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Wed, 5 Sep 2012 09:27:21 +0200
Subject: [PATCH] Reflect API change of SSH store in Web UI

Format of ipasshpubkey in users and hosts changed from BYTES to STR. Web UI no longer gets the value as base64 encoded string in a object.

Label was changed to reflect that the key don't have to be plain base64 encoded blob.

https://fedorahosted.org/freeipa/ticket/2989
---
 install/ui/field.js                            |  2 +-
 install/ui/test/data/ipa_init.json             |  2 +-
 install/ui/test/data/user_details_refresh.json | 12 ++++--------
 install/ui/test/data/user_mod.json             | 12 ++++--------
 ipalib/plugins/internal.py                     |  2 +-
 5 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/install/ui/field.js b/install/ui/field.js
index 8e2d116c0fec3f1a372c49b0c22822af4cedbf0c..49b9de084f10f9826f6e23b0d63b6e605b401057 100644
--- a/install/ui/field.js
+++ b/install/ui/field.js
@@ -649,7 +649,7 @@ IPA.sshkeys_field = function(spec) {
                 if (keys[i] === '') continue;
 
                 var value = {
-                    key: keys[i].__base64__,
+                    key: keys[i],
                     fingerprint: fingerprints[i]
                 };
                 values.push(value);
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index ff4c7489d235d0be7a2f1c98371921023a75cfa2..6a3bb02d8a982eecd53fb7c0d3d7192532f6e769 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -405,7 +405,7 @@
                         },
                         "sshkeystore": {
                             "keys": "SSH public keys",
-                            "set_dialog_help": "Base-64 encoded SSH public key:",
+                            "set_dialog_help": "SSH public key:",
                             "set_dialog_title": "Set SSH key",
                             "show_set_key": "Show/Set key",
                             "status_mod_ns": "Modified: key not set",
diff --git a/install/ui/test/data/user_details_refresh.json b/install/ui/test/data/user_details_refresh.json
index 900008270f3e6c5581d3dd8ba61bfac17e7baecc..43df0cba3235b89f874c65bb1f5d0a171392c90e 100644
--- a/install/ui/test/data/user_details_refresh.json
+++ b/install/ui/test/data/user_details_refresh.json
@@ -109,12 +109,8 @@
                         "/home/kfrog"
                     ],
                     "ipasshpubkey": [
-                        {
-                            "__base64__": "AAAAB3NzaC1kc3MAAACBAJQdBmxjnYdDzpGPzAD2kkoRwGbPIqVsu6mR0eyLjMJafQPbOkrgFpIwxAhb519FHAr0olSOklwq5Pvkm7rSpnoXDAEoVlW5jNCj33NrYkVJTAmtsa4ihZIqz7KJYkYifQyBxy8nYScAlEu1a1k9xfbRT8ZAmiCqgd6klWaKZXHBAAAAFQCd2wJW3Rb7kclRPbKaRF1hhdW+hwAAAIBr9ZozKls1lAkqMZuhGgnvlFg5J7DXKRY6iju1VfMc5HiY1mq197Qq2PVi4iQ1Ach3Pvj/MZGLhz/SyIsH59Uugl21KeQjk2HHt/ZLL1PrJvm9LmX3Fv2E8lQNnEyPaA2Ngf6O0bbzii41lp1F6wo3xQLJCLldljcG+wskRf5RrgAAAIAKTDWct9ES5BZADb3TfBAng2aeeojg6rDhS6i0WYPtna2hjCdRaCnnXM079JVcYBq3IK7mFpINnqnn252Mr9OqGsu/92gglfpTpXq2Lzkvd2dbcyTPQmNBM7+KFlUOZ4hWb4c5CVLBwILccL7QakwSHRYlRhCsDyKbI+2qPGwrXg=="
-                        },
-                        {
-                            "__base64__": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCaoWIiTBqTqsWnAHFUfOUNY65sk2KuEp798ESyDWmOuJbjQNHG0grl8d5D9/OMuDvSHAthkTR4rXn1QAMm+Geh63XhS+nnEpzinPKloMWyF8wsNEw117TX2mA8wzeea1HDcqd0v4YKyU5FAHm+6hOALB9mrAnRZ4WoTY6NWtm3aoRge1D26pOuLRyNFB5Etwa7cmJqaK8EeHN0XNPIbaAP1JNVe46wyYvMlE/yhGYS9qW36OJpQBJGk9nYqHT3/6ai2w3TQ8k5puvAwBcCe0wYhBE9o8c5PmImIfa8lZ3Oo2gHIiOyA9gyHv3MBqUxXBC6PmmYHEr6y/wnYnfSHF+N"
-                        }
+                        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaoWIiTBqTqsWnAHFUfOUNY65sk2KuEp798ESyDWmOuJbjQNHG0grl8d5D9/OMuDvSHAthkTR4rXn1QAMm+Geh63XhS+nnEpzinPKloMWyF8wsNEw117TX2mA8wzeea1HDcqd0v4YKyU5FAHm+6hOALB9mrAnRZ4WoTY6NWtm3aoRge1D26pOuLRyNFB5Etwa7cmJqaK8EeHN0XNPIbaAP1JNVe46wyYvMlE/yhGYS9qW36OJpQBJGk9nYqHT3/6ai2w3TQ8k5puvAwBcCe0wYhBE9o8c5PmImIfa8lZ3Oo2gHIiOyA9gyHv3MBqUxXBC6PmmYHEr6y/wnYnfSHF+N",
+                        "ssh-dss AAAAB3NzaC1kc3MAAACBAJQdBmxjnYdDzpGPzAD2kkoRwGbPIqVsu6mR0eyLjMJafQPbOkrgFpIwxAhb519FHAr0olSOklwq5Pvkm7rSpnoXDAEoVlW5jNCj33NrYkVJTAmtsa4ihZIqz7KJYkYifQyBxy8nYScAlEu1a1k9xfbRT8ZAmiCqgd6klWaKZXHBAAAAFQCd2wJW3Rb7kclRPbKaRF1hhdW+hwAAAIBr9ZozKls1lAkqMZuhGgnvlFg5J7DXKRY6iju1VfMc5HiY1mq197Qq2PVi4iQ1Ach3Pvj/MZGLhz/SyIsH59Uugl21KeQjk2HHt/ZLL1PrJvm9LmX3Fv2E8lQNnEyPaA2Ngf6O0bbzii41lp1F6wo3xQLJCLldljcG+wskRf5RrgAAAIAKTDWct9ES5BZADb3TfBAng2aeeojg6rDhS6i0WYPtna2hjCdRaCnnXM079JVcYBq3IK7mFpINnqnn252Mr9OqGsu/92gglfpTpXq2Lzkvd2dbcyTPQmNBM7+KFlUOZ4hWb4c5CVLBwILccL7QakwSHRYlRhCsDyKbI+2qPGwrXg=="
                     ],
                     "ipauniqueid": [
                         "a2854798-e7d811df-b69ad8ca-cb44a24c"
@@ -172,8 +168,8 @@
                         "Frog"
                     ],
                     "sshpubkeyfp": [
-                        "6E:70:C6:8E:88:2F:F1:5D:63:B4:C5:D1:B8:A6:D6:0C (ssh-dss)",
-                        "93:23:CD:AE:50:0F:BF:0A:EB:2C:0C:1A:0B:18:DF:0A (ssh-rsa)"
+                        "93:23:CD:AE:50:0F:BF:0A:EB:2C:0C:1A:0B:18:DF:0A (ssh-rsa)",
+                        "6E:70:C6:8E:88:2F:F1:5D:63:B4:C5:D1:B8:A6:D6:0C (ssh-dss)"
                     ],
                     "uid": [
                         "kfrog"
diff --git a/install/ui/test/data/user_mod.json b/install/ui/test/data/user_mod.json
index 4c7bfa479157d5bfa4232e8fcbf3449b83d49ab3..eb8a5e59e992f8c698e709a142adfe08d2e5ad7d 100644
--- a/install/ui/test/data/user_mod.json
+++ b/install/ui/test/data/user_mod.json
@@ -105,12 +105,8 @@
                 "/home/kfrog"
             ],
             "ipasshpubkey": [
-                {
-                    "__base64__": "AAAAB3NzaC1kc3MAAACBAJQdBmxjnYdDzpGPzAD2kkoRwGbPIqVsu6mR0eyLjMJafQPbOkrgFpIwxAhb519FHAr0olSOklwq5Pvkm7rSpnoXDAEoVlW5jNCj33NrYkVJTAmtsa4ihZIqz7KJYkYifQyBxy8nYScAlEu1a1k9xfbRT8ZAmiCqgd6klWaKZXHBAAAAFQCd2wJW3Rb7kclRPbKaRF1hhdW+hwAAAIBr9ZozKls1lAkqMZuhGgnvlFg5J7DXKRY6iju1VfMc5HiY1mq197Qq2PVi4iQ1Ach3Pvj/MZGLhz/SyIsH59Uugl21KeQjk2HHt/ZLL1PrJvm9LmX3Fv2E8lQNnEyPaA2Ngf6O0bbzii41lp1F6wo3xQLJCLldljcG+wskRf5RrgAAAIAKTDWct9ES5BZADb3TfBAng2aeeojg6rDhS6i0WYPtna2hjCdRaCnnXM079JVcYBq3IK7mFpINnqnn252Mr9OqGsu/92gglfpTpXq2Lzkvd2dbcyTPQmNBM7+KFlUOZ4hWb4c5CVLBwILccL7QakwSHRYlRhCsDyKbI+2qPGwrXg=="
-                },
-                {
-                    "__base64__": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCaoWIiTBqTqsWnAHFUfOUNY65sk2KuEp798ESyDWmOuJbjQNHG0grl8d5D9/OMuDvSHAthkTR4rXn1QAMm+Geh63XhS+nnEpzinPKloMWyF8wsNEw117TX2mA8wzeea1HDcqd0v4YKyU5FAHm+6hOALB9mrAnRZ4WoTY6NWtm3aoRge1D26pOuLRyNFB5Etwa7cmJqaK8EeHN0XNPIbaAP1JNVe46wyYvMlE/yhGYS9qW36OJpQBJGk9nYqHT3/6ai2w3TQ8k5puvAwBcCe0wYhBE9o8c5PmImIfa8lZ3Oo2gHIiOyA9gyHv3MBqUxXBC6PmmYHEr6y/wnYnfSHF+N"
-                }
+                "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaoWIiTBqTqsWnAHFUfOUNY65sk2KuEp798ESyDWmOuJbjQNHG0grl8d5D9/OMuDvSHAthkTR4rXn1QAMm+Geh63XhS+nnEpzinPKloMWyF8wsNEw117TX2mA8wzeea1HDcqd0v4YKyU5FAHm+6hOALB9mrAnRZ4WoTY6NWtm3aoRge1D26pOuLRyNFB5Etwa7cmJqaK8EeHN0XNPIbaAP1JNVe46wyYvMlE/yhGYS9qW36OJpQBJGk9nYqHT3/6ai2w3TQ8k5puvAwBcCe0wYhBE9o8c5PmImIfa8lZ3Oo2gHIiOyA9gyHv3MBqUxXBC6PmmYHEr6y/wnYnfSHF+N",
+                "ssh-dss AAAAB3NzaC1kc3MAAACBAJQdBmxjnYdDzpGPzAD2kkoRwGbPIqVsu6mR0eyLjMJafQPbOkrgFpIwxAhb519FHAr0olSOklwq5Pvkm7rSpnoXDAEoVlW5jNCj33NrYkVJTAmtsa4ihZIqz7KJYkYifQyBxy8nYScAlEu1a1k9xfbRT8ZAmiCqgd6klWaKZXHBAAAAFQCd2wJW3Rb7kclRPbKaRF1hhdW+hwAAAIBr9ZozKls1lAkqMZuhGgnvlFg5J7DXKRY6iju1VfMc5HiY1mq197Qq2PVi4iQ1Ach3Pvj/MZGLhz/SyIsH59Uugl21KeQjk2HHt/ZLL1PrJvm9LmX3Fv2E8lQNnEyPaA2Ngf6O0bbzii41lp1F6wo3xQLJCLldljcG+wskRf5RrgAAAIAKTDWct9ES5BZADb3TfBAng2aeeojg6rDhS6i0WYPtna2hjCdRaCnnXM079JVcYBq3IK7mFpINnqnn252Mr9OqGsu/92gglfpTpXq2Lzkvd2dbcyTPQmNBM7+KFlUOZ4hWb4c5CVLBwILccL7QakwSHRYlRhCsDyKbI+2qPGwrXg=="
             ],
             "ipauniqueid": [
                 "a2854798-e7d811df-b69ad8ca-cb44a24c"
@@ -159,8 +155,8 @@
                 "Frog"
             ],
             "sshpubkeyfp": [
-                "6E:70:C6:8E:88:2F:F1:5D:63:B4:C5:D1:B8:A6:D6:0C (ssh-dss)",
-                "93:23:CD:AE:50:0F:BF:0A:EB:2C:0C:1A:0B:18:DF:0A (ssh-rsa)"
+                "93:23:CD:AE:50:0F:BF:0A:EB:2C:0C:1A:0B:18:DF:0A (ssh-rsa)",
+                "6E:70:C6:8E:88:2F:F1:5D:63:B4:C5:D1:B8:A6:D6:0C (ssh-dss)"
             ],
             "uid": [
                 "kfrog"
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index 890ebb4523a45bb85767f033c51866683d36a699..b9695d8f34378df1e9e5d5aa1a99e75486a425aa 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -544,7 +544,7 @@ class i18n_messages(Command):
             },
             "sshkeystore": {
                 "keys": _("SSH public keys"),
-                "set_dialog_help": _("Base-64 encoded SSH public key:"),
+                "set_dialog_help": _("SSH public key:"),
                 "set_dialog_title": _("Set SSH key"),
                 "show_set_key": _("Show/Set key"),
                 "status_mod_ns": _("Modified: key not set"),
-- 
1.7.11.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to