Seeing scripts in unix box - Information Server - ibm-information-server

We did some changes in login.wpcs to change the user name provided in UI to lower case as LDAP login was not case sensitive. Now the issue is we are not able to login as 'Admin' and we have not given any of the roles permissions to change the ACG/Roles etc. Also Screen level access is not permitted to any other role. How do I now login into the company and change the login script. I tried to mount the document store '/scripts' folder but it also didn't help. I am not able to see the scripts in the unix box mounted location.

Once login.wpcs script is messed up can't even get to the UI to clean up. Try the following procedure
 
1. From a working MDM CE environment of same version, take a Selective Environment Export which just contains the /scripts/login/Login.wpcs file from docstore. Same can be achieved by running the following script snippet in sandbox
 
var envObjList = new EnvObjectList();
envObjList.setTypeToExport("DOC_STORE");
envObjList.addObjectByNameToExport("/scripts/login/Login.wpcs", null, "CREATE_OR_UPDATE");
var result = exportEnv(envObjList, "export_20120501_234914.zip");
out.println("result: " + result);
 
 
2. Run sh $TOP/bin/importCompanyFromZip.sh  --company_code= --zipfile_path=
 
Now try logging in.

Related

Securing NodeRED dashboard from unwanted access

I'm trying to create some kind of user authentication to prevent unwanted access to my NodeRED's User Interface. I've searched online and found 2 solutions, that for some reason didn't worked out. Here they are:
Tried to add the httpNodeAuth{user:"user", pass:"password"} key to the bluemix-settings.js but after that my dashboard kept prompting me to type username and password, even after I typed the password defined at pass:"password" field.
Added the user defined Environtment Variables NODE_RED_USERNAME : username and NODE_RED_PASSWORD : password . But nothing has changed.
Those solutions were sugested here: How could I prohibit anonymous access to my NodeRed UI Dashboard on IBM Cloud(Bluemix)?
Thanks for the help, guys!
Here is a little bit of the 'bluemix-settings.js'
autoInstallModules: true,
// Move the admin UI
httpAdminRoot: '/red',
// Serve up the welcome page
httpStatic: path.join(__dirname,"public"),
//GUI password authentication (ALEX)
httpNodeAuth: {user:"admin",pass:"$2y$12$W2VkVHvBTwRyGCEV0oDw7OkajzG3mdV3vKRDkbXMgIjDHw0mcotLC"},
functionGlobalContext: { },
// Configure the logging output
logging: {
As described in the Node-RED docs here, you need to add a section as follows to the settings.js (or in the case of Bluemix/IBM Cloud the bluemix-settings.js file.
...
httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
...
The pass files is a bcrypt hash of the password. There are 2 ways listed in the docs about how to generate the hash in the correct way.
if you have a local copy of Node-RED installed you can use the following command:
node-red admin hash-pw
As long as you have a local NodeJS install you can use the following:
node -e "console.log(require('bcryptjs').hashSync(process.argv[1], 8));" your-password-here
You may need to install bcryptjs first with npm install bcryptjs first.

AWS MobileAnalyticsManager access to folder 'AWS Mobile Services\M4SP' is denied

I am trying to add the AWSSDK DLL into my C# code to collect my event data and pass the data to the AWS bucket. My C# code is created with VS Share point template. The project contains WSP files. The following code indicates how I use the AWSSDK :
using Amazon;
using Amazon.CognitoIdentity;
using Amazon.MobileAnalytics.MobileAnalyticsManager;
CognitoAWSCredentials credentials = new CognitoAWSCredentials(
"us-east-1:xxxxxx",//PoolID
RegionEndpoint.USEast1
);
Amazon.AWSConfigs.ApplicationName = "M4SP";
AWSConfigs.LoggingConfig.LogMetrics = true;
AWSConfigs.LoggingConfig.LogResponses = ResponseLoggingOption.Always;
AWSConfigs.LoggingConfig.LogMetricsFormat = LogMetricsFormatOption.JSON;
MobileAnalyticsManager manager = MobileAnalyticsManager.GetOrCreateInstance(
"xxxxxxxxxxxxxxxxxxx",//AppID
credentials,
RegionEndpoint.USEast1 // Region
);
CustomEvent customEvent = new CustomEvent("TestRecordEvent");
customEvent.AddAttribute("label", "M4SP");
customEvent.AddAttribute("action", "invoke");
customEvent.AddAttribute("details", "run the workflow test");
manager.RecordEvent(customEvent);
I found the code inside AWSSDK DLL was trying to log the data to local folder before passing it to AWS database. The location of the folder is C:\Users\[userid]\AppData\Roaming\AWS Mobile Services.
There is no problem in a standalone project since it always uses current user’s identity to run the application so it has access to the folder. But, because of the authentication mechanism of SharePoint solutions, it uses Application Pool Identity to access the folder and it gets access denied issue and the whole process fails.
Here is the error:
"Access to the path 'AWS Mobile Services\M4SP' is denied."
I modified the access right of Share point Application Pool Identity (in my case, it is “network service” account) but it still can’t access the folder .
Does anyone have a solution for this issue? Thanks very much for the help!!

Inside Bluemix cloud, is there anyway to change the WORKSPACE_ID fast?

After I made this demo app to work inside my account on Bluemix cloud
https://github.com/eGlobeBizCom/food-coach,
I create another workspace inside the above Watson Service Instance, and want to connect the above js code app with the second WORKSPACE_ID. Inside Bluemix cloud, in Runtime section, is there anyway to change the above ?WORKSPACE_ID fast? Or we have to change the WORKSPACE_ID manually in manifest.yml mentioned below
Update conversation service workspace without changing workspace ID
After many searches on the web, no info can answer the above Q. Any suggestions are warmly welcome.
in this case, you can:
1. Edit the workspace ID inside the app.js file in line #61. If this link is really the reposity you are using.
But, dont miss replace the username and password from your Conversation Service, replace with Service Credentials.
Make sure if the workspace have this format if your replace <workspace_id> inside the workspace variable:
var workspace = "4235254-546563g-sfgsg-sgs-ggsfsegs" //test
var workspace = '4235254-546563g-sfgsg-sgs-ggsfsegs' //test
2. You can see the line have the code: process.env.WORKSPACE_ID. This is because the repository use dotenv package, you can simple edit the .env file and replace the value of the WORKSPACE_ID;
3. You can simple add the Enviroment Variables in the IBM Bluemix too! Try:
In this case, you will click in the Runtime, and you will see the "Enviroment Variables". Replace the name with WORKSPACE_ID and the value with your workspace_id. After, restart your application.

Bluemix - Assigning Space Quota while creating space

I am trying to create a space with a specific space quota plan assigned through CF CLI command. I had created a space quota plan called myPlanTiny and fired the CLI command as below.
cf create-space mySpace1 -o my_org1 -q myPlanTiny
The space got created, however the quota plan assignment did not take effect. Only the default plan got assigned to the newly created space. My Bluemix account is a public bluemix account.
Requesting your help to understand why the space quota assignment does not take effect.
Thanks.
The assigned quota is set to default for each newly created space, both from UI and CF CLI. This quota is related to the org and not to the single space in public Bluemix. Anyway there is a reserved set of cf commands that only administrators can run. These commands include for example things around quota and creating orgs, this could be the reason why you are not able to change the quota. If you are an Admin you should be able to set a custom quota and use it in a newly created space using the command you provided. After doing this, if the command cf space <spacename> still shows the default I suggest you to open a support request using one of the following methods in order to engage the Bluemix Project Office Team:
Use the Support Widget. It is available from the user avatar in the
   upper right corner of the main Bluemix UI.  After opening the support
   widget panel, select Get Help > Get In Touch , select the type of
   assistance you need, and then fill out the support form.
Use the Support Site 'Get Help' form. This form is available on a separate site that is made available for ticket submission when you cannot log into Bluemix and access the Support Widget.  Go to http://ibm.biz/bluemixsupport and fill in the support request form.
1) update your CF CLI
2) create quota: cf create-space-quota myQuota -i 256M -m 256M -r 5 -s 5 --allow-paid-service-plans
3) create space and assign your quota: cf create-space personalSpace -q myQuota
4) if the issue is still there open a new ticket.
Thanks for all your help.
I updated the CF CLI version to 6.16.1+924508c-2016-02-26 and created a space quota and a space set to the newly created quota.
I verified the space-quota set on the space using the command below
cf space SPACE_NAME
It showed up the correct details.
Initially, I got confused with by the tiles on the dashboard was saying 1 GB/16 GB Used. I guess that is shown at the org level and probably a functionality as designed.
The issue is resolved . Thanks!!!

Service is not running when OS is upgraded from Windows 8.1 to Windows 10

We have upgraded windows from 8.1 to 10.
Now in Windows 10 services installed by us are not running.
The same services are running properly if we install these services on Windows 8.1.
ON windows 10, we tried below things which didn't solve the problem.
services-> select service -> properties -> Set [Log on] as LOCAL SERVICE
Set full permission to "perticuler" user or "everyone" user for the folder where service files exist.
Change owner of folder as "everyone", "system" or "perticuler" user where service files exist.
Below is a workaround which works but not feasible for us since it requires password and actually we want to know the actual reason behind this problem.
workaround :
1. services-> select service -> properties -> Set [Log on] as "This account" where user can be selected and it also requires password. Refer attached image.
Please note that the service is a dot net(c#) service and it runs internally a jar file. if it is able to run jar file then only service starts successfully.
Thanks in advance
I have found the cause and solution.
[Cause of problem]
Service unable to understand that, to run JAR file, which program should be run.
[Detail]
I tried to debug the code.
At the location where process is started, popup message like shown in below image is occurred.
location : processSample.Start()
It means that atleast once user need to select the program.
If we select [Java(TM) Platform SE binary] once, then after that the
service always runs successfully.
This behavior is in Windows 10 only.
In addition to program selection, user setting shown in image in question is also required to run the service.
I want to say that, in default program setting already correct program is selected for .jar files as shown in below image, but still windows 10 asks user to select program once.
[Solution]
Run JAR file from windows(c#) service with settings below :
sampleProcess.StartInfo.FileName = "javaw.exe";
sampleProcess.StartInfo.Arguments = "-jar Sample.jar";
sampleProcess.StartInfo.WorkingDirectory = #"C:\SampleFolder";
sampleProcess.StartInfo.UseShellExecute = false;
sampleProcess.EnableRaisingEvents = true;
sampleProcess.StartInfo.CreateNoWindow = false;
Here working directory is the location where the [Sample.jar] does exist.
additinally a Path environment variable must be set in order to execure "javaw.exe".
Before fix I had implementation as below which is not proper for every system environment :
sampleProcess.StartInfo.FileName = "Sample.jar";
sampleProcess.StartInfo.WorkingDirectory = #"C:\SampleFolder";
sampleProcess.EnableRaisingEvents = true;
sampleProcess.StartInfo.CreateNoWindow = false;