Re: [Pki-devel] [PATCH] 485 Fixed TPS UI system menu.
Have seen demo, and it looks good. ACK - Original Message - > From: "Endi Sukma Dewata"> To: "pki-devel" > Sent: Thursday, October 20, 2016 2:21:43 PM > Subject: [Pki-devel] [PATCH] 485 Fixed TPS UI system menu. > > The TPS UI has been modified to adjust the system menu based > on the list of accessible components obtained during login. > > The TPSApplication has been modified to use TPSAccountService > which returns the list of accessible components based on the > following properties in the CS.cfg: > * admin: target.configure.list > * agent: target.agent_approve.list > > The AccountInfo has been changed to extend the ResourceMessage > such that it can be used to pass the list of accessible > components as an attribute. > > https://fedorahosted.org/pki/ticket/2523 > > -- > Endi S. Dewata > > ___ > Pki-devel mailing list > Pki-devel@redhat.com > https://www.redhat.com/mailman/listinfo/pki-devel ___ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
Re: [Pki-devel] [PATCH] 486 Fixed TPS UI for agent approval.
Have seen demo and looks good. ACK - Original Message - > From: "Endi Sukma Dewata"> To: "pki-devel" > Sent: Thursday, October 20, 2016 2:21:49 PM > Subject: [Pki-devel] [PATCH] 486 Fixed TPS UI for agent approval. > > The TPS UI has been updated to support TPS agent approval process > for changes in authenticators, connectors, and profile mappings in > addition to profiles. > > The ConfigEntryPage has been updated to display the action links > consistently in the above components for all possible role and > status combinations. > > The ProfilePage has been removed since the code has been merged > into its super class. > > https://fedorahosted.org/pki/ticket/2523 > > -- > Endi S. Dewata > > ___ > Pki-devel mailing list > Pki-devel@redhat.com > https://www.redhat.com/mailman/listinfo/pki-devel ___ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
[Pki-devel] [pki-devel][PATCH] 0084-TPS-token-enrollment-fails-to-setupSecureChannel-whe.patch
TPS token enrollment fails to setupSecureChannel when TPS and TKS security db is on fips mode. Ticket #2513. Simple fix allows the TPS and TKS the ability to obtain the proper internal token, even in FiPS mode. From 00bba5092fa32b956d646b4711411b8c57bd8f75 Mon Sep 17 00:00:00 2001 From: Jack MagneDate: Thu, 20 Oct 2016 15:18:12 -0700 Subject: [PATCH] TPS token enrollment fails to setupSecureChannel when TPS and TKS security db is on fips mode. Ticket #2513. Simple fix allows the TPS and TKS the ability to obtain the proper internal token, even in FiPS mode. --- .../cms/src/com/netscape/cms/servlet/tks/SecureChannelProtocol.java| 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/server/cms/src/com/netscape/cms/servlet/tks/SecureChannelProtocol.java b/base/server/cms/src/com/netscape/cms/servlet/tks/SecureChannelProtocol.java index db42cab..1997d11 100644 --- a/base/server/cms/src/com/netscape/cms/servlet/tks/SecureChannelProtocol.java +++ b/base/server/cms/src/com/netscape/cms/servlet/tks/SecureChannelProtocol.java @@ -688,10 +688,11 @@ public class SecureChannelProtocol { public CryptoToken returnTokenByName(String name, CryptoManager manager) throws NoSuchTokenException { +CMS.debug("returnTokenByName: requested name: " + name); if (name == null || manager == null) throw new NoSuchTokenException(); -if (name.equals("internal") || name.equals("Internal KeyStorage Token")) { +if (name.equals("internal") || name.equals("Internal Key Storage Token")) { return manager.getInternalKeyStorageToken(); } else { return manager.getTokenByName(name); -- 2.5.0 ___ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
[Pki-devel] [PATCH] 486 Fixed TPS UI for agent approval.
The TPS UI has been updated to support TPS agent approval process for changes in authenticators, connectors, and profile mappings in addition to profiles. The ConfigEntryPage has been updated to display the action links consistently in the above components for all possible role and status combinations. The ProfilePage has been removed since the code has been merged into its super class. https://fedorahosted.org/pki/ticket/2523 -- Endi S. Dewata >From 0d3e5611a05d41628b2ddb4225f0e6d9682494f1 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata"Date: Thu, 20 Oct 2016 00:54:47 +0200 Subject: [PATCH] Fixed TPS UI for agent approval. The TPS UI has been updated to support TPS agent approval process for changes in authenticators, connectors, and profile mappings in addition to profiles. The ConfigEntryPage has been updated to display the action links consistently in the above components for all possible role and status combinations. The ProfilePage has been removed since the code has been merged into its super class. https://fedorahosted.org/pki/ticket/2523 --- base/tps/shared/webapps/tps/js/profile.js | 85 --- base/tps/shared/webapps/tps/js/tps.js | 132 +++--- base/tps/shared/webapps/tps/ui/index.html | 4 +- 3 files changed, 124 insertions(+), 97 deletions(-) diff --git a/base/tps/shared/webapps/tps/js/profile.js b/base/tps/shared/webapps/tps/js/profile.js index 0182a80632b61289e56a22da31ee8328a07853f8..432aa6b22d1368b8f6a8b3091c3b5203fd3ea492 100644 --- a/base/tps/shared/webapps/tps/js/profile.js +++ b/base/tps/shared/webapps/tps/js/profile.js @@ -81,91 +81,6 @@ var ProfilesTable = ModelTable.extend({ } }); -var ProfilePage = ConfigEntryPage.extend({ -renderContent: function() { -var self = this; - -ProfilePage.__super__.renderContent.call(self); - -var roles = tps.user.Roles.Role; -var status = self.entry.status; - -if (_.contains(roles, "Administrators")) { - -// admins can edit disabled entries -if (status == "Disabled") { -self.editAction.show(); -} else { -self.editAction.hide(); -} - -} else { -self.editAction.hide(); -} - -if (_.contains(roles, "TPS Agents")) { - -// agents can enable or disable entries -if (status == "Disabled") { -self.approveAction.hide(); -self.rejectAction.hide(); -self.enableAction.show(); -self.disableAction.hide(); - -} else if (status == "Enabled") { -self.approveAction.hide(); -self.rejectAction.hide(); -self.enableAction.hide(); -self.disableAction.show(); - -} else if (status == "Pending_Approval") { -self.approveAction.show(); -self.rejectAction.show(); -self.enableAction.hide(); -self.disableAction.hide(); - -} else { -self.approveAction.hide(); -self.rejectAction.hide(); -self.enableAction.hide(); -self.disableAction.hide(); -} - -self.submitAction.hide(); -self.cancelAction.hide(); - -} else if (_.contains(roles, "Administrators")) { - -// admins can submit or cancel entries -if (status == "Disabled") { -self.submitAction.show(); -self.cancelAction.hide(); - -} else if (status == "Pending_Approval") { -self.submitAction.hide(); -self.cancelAction.show(); - -} else { -self.submitAction.hide(); -self.cancelAction.hide(); -} - -self.approveAction.hide(); -self.rejectAction.hide(); -self.enableAction.hide(); -self.disableAction.hide(); - -} else { -self.enableAction.hide(); -self.disableAction.hide(); -self.approveAction.hide(); -self.rejectAction.hide(); -self.submitAction.hide(); -self.cancelAction.hide(); -} -} -}); - var ProfilesPage = Page.extend({ load: function() { var self = this; diff --git a/base/tps/shared/webapps/tps/js/tps.js b/base/tps/shared/webapps/tps/js/tps.js index ac9330d6bb20fbce551995295096be1d6f0fb664..9d47d30d3053ae5af7db6cbbefc4a5eec5eac930 100644 --- a/base/tps/shared/webapps/tps/js/tps.js +++ b/base/tps/shared/webapps/tps/js/tps.js @@ -241,23 +241,135 @@ var ConfigEntryPage = EntryPage.extend({ ConfigEntryPage.__super__.renderContent.call(self); +var roles = tps.user.Roles.Role; var status = self.entry.status; -if (status == "Disabled") { -self.editAction.show(); -
[Pki-devel] [PATCH] 485 Fixed TPS UI system menu.
The TPS UI has been modified to adjust the system menu based on the list of accessible components obtained during login. The TPSApplication has been modified to use TPSAccountService which returns the list of accessible components based on the following properties in the CS.cfg: * admin: target.configure.list * agent: target.agent_approve.list The AccountInfo has been changed to extend the ResourceMessage such that it can be used to pass the list of accessible components as an attribute. https://fedorahosted.org/pki/ticket/2523 -- Endi S. Dewata >From e90bcdbe1b9e05f6224d88cdc005480003c20308 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata"Date: Thu, 20 Oct 2016 00:54:47 +0200 Subject: [PATCH] Fixed TPS UI system menu. The TPS UI has been modified to adjust the system menu based on the list of accessible components obtained during login. The TPSApplication has been modified to use TPSAccountService which returns the list of accessible components based on the following properties in the CS.cfg: * admin: target.configure.list * agent: target.agent_approve.list The AccountInfo has been changed to extend the ResourceMessage such that it can be used to pass the list of accessible components as an attribute. https://fedorahosted.org/pki/ticket/2523 --- .../com/netscape/certsrv/account/AccountInfo.java | 8 ++- .../com/netscape/certsrv/base/ResourceMessage.java | 11 ++- .../org/dogtagpki/server/rest/AccountService.java | 46 + base/tps/shared/webapps/tps/ui/index.html | 56 +-- .../dogtagpki/server/tps/TPSAccountService.java| 80 ++ .../dogtagpki/server/tps/rest/TPSApplication.java | 4 +- 6 files changed, 163 insertions(+), 42 deletions(-) create mode 100644 base/tps/src/org/dogtagpki/server/tps/TPSAccountService.java diff --git a/base/common/src/com/netscape/certsrv/account/AccountInfo.java b/base/common/src/com/netscape/certsrv/account/AccountInfo.java index 7943d229a23198771d06d288cf31c78604995f77..3310bf0d07d69f14dd1fb1b1d2bb8abee4a8ec36 100644 --- a/base/common/src/com/netscape/certsrv/account/AccountInfo.java +++ b/base/common/src/com/netscape/certsrv/account/AccountInfo.java @@ -33,11 +33,13 @@ import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.adapters.XmlAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import com.netscape.certsrv.base.ResourceMessage; + /** * @author Endi S. Dewata */ @XmlRootElement(name="Account") -public class AccountInfo { +public class AccountInfo extends ResourceMessage { public static Marshaller marshaller; public static Unmarshaller unmarshaller; @@ -98,7 +100,7 @@ public class AccountInfo { @Override public int hashCode() { final int prime = 31; -int result = 1; +int result = super.hashCode(); result = prime * result + ((email == null) ? 0 : email.hashCode()); result = prime * result + ((fullName == null) ? 0 : fullName.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); @@ -110,7 +112,7 @@ public class AccountInfo { public boolean equals(Object obj) { if (this == obj) return true; -if (obj == null) +if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; diff --git a/base/common/src/com/netscape/certsrv/base/ResourceMessage.java b/base/common/src/com/netscape/certsrv/base/ResourceMessage.java index 1214b45fbf59341f4c515116071361835c59a119..85d0d07a434e6c62f8a45a4a1b7895c70d524c8c 100644 --- a/base/common/src/com/netscape/certsrv/base/ResourceMessage.java +++ b/base/common/src/com/netscape/certsrv/base/ResourceMessage.java @@ -26,6 +26,7 @@ import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.adapters.XmlAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import com.netscape.certsrv.account.AccountInfo; import com.netscape.certsrv.key.AsymKeyGenerationRequest; import com.netscape.certsrv.key.KeyArchivalRequest; import com.netscape.certsrv.key.KeyRecoveryRequest; @@ -35,8 +36,14 @@ import com.netscape.certsrv.key.SymKeyGenerationRequest; * @author Ade Lee */ @XmlRootElement(name = "ResourceMessage") -@XmlSeeAlso({ KeyArchivalRequest.class, KeyRecoveryRequest.class, SymKeyGenerationRequest.class, -PKIException.Data.class, AsymKeyGenerationRequest.class }) +@XmlSeeAlso({ +AccountInfo.class, +KeyArchivalRequest.class, +KeyRecoveryRequest.class, +SymKeyGenerationRequest.class, +PKIException.Data.class, +AsymKeyGenerationRequest.class +}) @XmlAccessorType(XmlAccessType.NONE) public class ResourceMessage { diff --git a/base/server/cms/src/org/dogtagpki/server/rest/AccountService.java b/base/server/cms/src/org/dogtagpki/server/rest/AccountService.java index 827e99e076585d0732bfde8ae795d6ae63648d5f..673db45b6513f081efa4c8b1c65bb81fd5e378bc