Cruise Control .NET Security - ldap

I am attempting to implement LDAP authentication, along with the required permissions.
<internalSecurity>
<cache type="inMemoryCache" duration="60" mode="sliding" />
<audit>
<xmlFileAudit location="D:\Logs\CCNet_Audit.xml"/>
</audit>
<auditReader type="xmlFileAuditReader" location="D:\Logs\CCNet_Audit.xml"/>
<users>
<ldapUser name="*username*" domain="*localdomain*"/>
</users>
<permissions>
<rolePermission name="Admin" forceBuild="Allow" sendMessage="Allow" startProject="Allow" changeProject="Allow" viewSecurity="Allow" modifySecurity="Allow" viewProject="Allow" viewConfiguration="Allow" >
<users>
<userName name="*username*"/>
</users>
</rolePermission>
</permissions>
Inside my project I have the following XML:
<project name="TestProject" description="TestProject" queue="Q7">
<security type="defaultProjectSecurity" defaultRight="Deny">
<permissions>
<rolePermission name="Admin" ref="Admin"/>
</permissions>
</security>
My log at (D:\Logs\CCNet_Audit.xml) is saying that I am "Denied"
<event><dateTime>2015-08-17T09:30:41.7973762-04:00</dateTime><user>*username*</user><type>Login</type><outcome>Deny</outcome></event>
and the project is unavailable within CC Tray.
My username is correct and I have the domain correct within the configuration (I just don't want to share it).
One thing I have noticed is that There seems to be a case issue within the username that Cruise Control is getting c-Joe.smith versus the english "normalization" of c-Joe.Smith . . . and yes I have tried it both ways.
Any help?

Try setting defaultRight="Allow" for your admin group.
<rolePermission name="Admin" defaultRight="Allow" forceBuild="Allow" sendMessage="Allow" startProject="Allow" changeProject="Allow" viewSecurity="Allow" modifySecurity="Allow" viewProject="Allow" viewConfiguration="Allow" >
<users>
<userName name="*username*"/>
</users>
</rolePermission>

Related

Resourse permission checker Liferay 7

I have my portlet with CRUD-operations (different bundles, services, etc.).
I want to implement custom actions in permission for this portlet.
I create default.xml file:
<?xml version="1.0"?>
<resource-action-mapping>
<portlet-resource>
<portlet-name>com.mypackage.MyPortlet</portlet-name>
<permissions>
<supports>
<action-key>STACKOVERFLOW_ACTION</action-key>
</supports>
</permissions>
</portlet-resource>
</resource-action-mapping>
And create portlet.properties:
include-and-override=portlet-ext.properties
resource.actions.configs=resource-actions/default.xml
The questions is - why do I have nothing in control panel besides default actions life "ADD_TO_PAGE", etc? What am I doing wrong?
UPD:
This varient doesn't work too. =(
<?xml version="1.0"?>
<!DOCTYPE resource-action-mapping PUBLIC "-//Liferay//DTD Resource Action Mapping 7.0.0//EN" "http://www.liferay.com/dtd/liferay-resource-action-mapping_7_0_0.dtd">
<resource-action-mapping>
<model-resource>
<model-name>mypackage.web.portlet.MyPortlet</model-name>
<portlet-ref>
<portlet-name>mypackage_web_portlet_MyPortlet</portlet-name>
</portlet-ref>
<root>true</root>
<weight>1</weight>
<permissions>
<supports>
<action-key>VIEW_TEST</action-key>
</supports>
<site-member-defaults>
<action-key>SUBSCRIBE_TEST</action-key>
</site-member-defaults>
<guest-defaults />
<guest-unsupported>
<action-key>ADD_ENTRY_TEST</action-key>
<action-key>PERMISSIONS_TEST</action-key>
<action-key>SUBSCRIBE_TEST</action-key>
</guest-unsupported>
</permissions>
</model-resource>
You should use the <model-resource> block rather than <portlet-resource>: Portlet-Resource is handled by Liferay (and uses the predefined vocabulary) while your portlet or service introduces its own datatypes, on which you can define your own permissions.

Visual Studio 2015 - Change Setting or Variable at time of Publish

Is it possible to change a setting or variable when the application is published
or is there some sort of condition to run an IF THEN against?
for example, I want to change the way the log files are written when I publish and I often forget to make the change when I publish it
Web.Live.Config:
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
-->
<appSettings>
<add key="ClaimPackPath" value="C:\\inetpub\\wwwroot\\Application\\ClaimPacks\\" xdt:Locator="Match(key)" xdt:Transform="Replace" />
</appSettings>
</configuration>
Wg.Debug.Config:
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
-->
<appSettings>
<add key="ClaimPackPath" value="C:\\Debug\\wwwroot\\Application\\ClaimPacks\\" xdt:Locator="Match(key)" xdt:Transform="Replace" />
</appSettings>
</configuration>
Then in the application you can request the variable like so :
string filepath = ConfigurationManager.AppSettings["ClaimPackPath"];
And it will change for whatever publish profile you choose at time of publish :)

Adding Community Members to a community activity using the REST API gives 403

We want to add community members (as author) to a community activity.
We see that both on prem and in Connections Cloud, that we get a 403 error.
I have reproduced this using the SBT playground (https://greenhouse.lotus.com/sbt/SBTPlayground.nsf/Explorer.xsp#)
This is the XML that we post:
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
<id>test1234</id>
<contributor>
<name>Test User/name>
<snx:userid>TestID</snx:userid>
<snx:role>member</snx:role>
<snx:userState>active</snx:userState>
</contributor>
<title>Test User</title>
<updated>2016-03-04T09:25:17Z</updated>
<summary type="text">Member profile for Test User</summary>
<category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="person"> </category>
<snx:role component="http://www.ibm.com/xmlns/prod/sn/activities">member</snx:role>
</entry>
To the Endpoint for activities: https://apps.na.collabserv.com/activities/service/atom2/acl?activityUuid=a750558c-d555-474d-8fcf-c3577276e9af
When we work "on-prem" we don't get error when we add community owners to the activity. Only when we (try to) add community members this 403 error occurs.
When we perform the action through the UI, there are no issues
We finaly have managed to add community members (not owners) to community_activity programmatically in IBM Connections.
When creating a community activity, Ibm Connections adds groups (as role) to community activities. If you want to add a specific member to your activity as an editor/reader, then you have to tell IBM Connections what role you want to give the other members from the group.
Can you try with below api and I am also attaching sample body you should be posting.
API : https://apps.na.collabserv.com/communities/service/atom/community/members?communityUuid=
Body
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
<contributor>
<email>mkataria#in.ibm.com</email>
<snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">202432348</snx:userid>
<snx:userState xmlns:snx="http://www.ibm.com/xmlns/prod/sn">active</snx:userState>
<snx:isExternal xmlns:snx="http://www.ibm.com/xmlns/prod/sn">false</snx:isExternal>
<name>Manish Kataria</name>
</contributor>
<snx:role xmlns:snx="http://www.ibm.com/xmlns/prod/sn" component="http://www.ibm.com/xmlns/prod/sn/communities">owner</snx:role>
<category term="person" scheme="http://www.ibm.com/xmlns/prod/sn/type"></category>
<category term="business-owner" scheme="http://www.ibm.com/xmlns/prod/sn/type"></category>
<snx:orgId xmlns:snx="http://www.ibm.com/xmlns/prod/sn">186</snx:orgId></entry>
Make sure content type is application/atom+xml
Sorry I missed the activity part, can you try below and share the exact error you get if any.
API : /activities/service/atom2/acl?activityUuid=
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
<contributor>
<email>abc#org.com</email>
</contributor>
<category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="person" />
<snx:role component="http://www.ibm.com/xmlns/prod/sn/activities">member</snx:role>
</entry>

Wix: How to remove comment in XML file

I have the following config file in my application:
<configuration>
<appSettings>
<!--Setting for user name-->
<add key="wcf:userName" value="wcfuser" />
<!--Setting for password-->
<add key="wcf:userPassword" value="abcdef" />
<!--Setting for is cloud application-->
<add key="IsCloudApplication" value="true" />
</appSettings>
<configuration>
I want remove this comment on the production server via Wix XmlConfig. I tried to use the following code:
<util:XmlConfig Id="RemoveWcfComments" File="[INSTALLFOLDER]Web.config" Action="delete" ElementPath="configuration/appSettings" VerifyPath="<!--Settings for user name-->" Node="element" On="install"/>
,but this is not working: exceptions no occurs, but the comment remains in the config file. Any ideas?
Thank in advance.
I'm not exactly sure but you can try this:
<util:XmlConfig
Id="RemoveWcfComments"
File="[INSTALLFOLDER]Web.config"
Action="delete"
ElementPath="//configuration/appSettings"
VerifyPath="//configuration/appSettings/comment()"
Node="value"
On="install"/>
As you can see ElementPath and VerifyPath are XPath-s, so they are invalid in your code. I'm not sure that Node="value" is right option, you could try Node="element" too.
Using Xpath the Comment() method will select all the the comments underneath AppSettings, if you have multiple comments but want to delete only one, then make use of the xpath below:
VerifyPath="//configuration/appSettings/comment()[.='Settings for user name and password']"
If there are multiple comments and you want to delete the first comment based on the order then you can make use of the below xpath as well:
VerifyPath="//configuration/appSettings/comment()[1]"

Tsung Issue with Dyn_Variable

I am very new to ERLANG and TSung, I never worked in this areas, but I am very much keen to know the fundamentals and do distributed load test for my web application. I am in half the way to complete, but I have a big hurdle and not able to moving forward , please read below tsung.xml file and advise me where & what I am missing?
**===> tsung.xml (this file perfectly working without any errors)**
*<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel = "debug" dumptraffic="true" version="1.0">
<clients>
<client host="localhost" weight ="1" maxusers="40000" cpu = "1" >
<ip value = '127.000.000.111'/>
</client>
</clients>
<servers>
<server host="127.000.000.112" port="80" type="tcp"></server>
</servers>
<load duration="1" unit="minute">
<arrivalphase phase="1" duration="1" unit="minute">
<users arrivalrate="10" unit="second"></users>
</arrivalphase>
</load>
<sessions>
<session name="mySession" probability="100" type="ts_http">
<transaction name="trx">
<request>
<dyn_variable name="myId" re="<myId>(\.*)\</myId>"/> <-- Trying with RegExp option, not getting the value myId
<!--dyn_variable name="myId" xpath="//response/myId" /--> <-- Trying with xpath option, not getting the value myId
<!--dyn_variable name="myId" jsonpath="response.myId" /--> <-- Trying with jsonpath option, not getting the value myId
<http url='http://127.000.000.112/Create_Rec' method='POST' version='1.1' content_type='text/xml'/>
</request>
<request subst="true">
<http url='http://999.000.000.999/Get_Rec/myId=%%_myId%%' method='GET' version='1.1' content_type='application/xml'/>
</request>
</transaction>
</session>
</sessions>
</tsung>*
When I run this url (it is web service call) "http://_127.000.000.112/Create_Rec" in the web browser, I get the following similar response from Server (in the back ground it creates the record in database and generates new id i.e. myId). When I run above tsung.xml, the first request working perfectly fine as I expected.
===> response (browser response)
<response id="SomeWebService">
<status>
<statusCode>1</statusCode>
<statusMsg>SomeMessage</statusMsg>
<statusTime>2013-06-20 02:52:25</statusTime>
</status>
<myId>298346728934734987</myId>
</response>
What I am looking here, I need to grab the myId from first request and pass into second request myId=%%_myId%%, but it is never working and myId always empty string. I am beyond of dyn_variable since two days, no clue and proper examples/documentation on it. Please suggest me, what I am missing.
You will have to set up the subst="true" in your request for substitution to work. So, your request should change to..
<request subst="true">
If still it doesn't work then I would suggest you to see the tsung.dump file and check the response which you are getting from server