About CA-client in HLF Sample - client

refer to the image below,
There is a line
"HFCAClient caClient = HFCAClient.createNewInstance("https://localhost:7054", props);"
So far, I cannot find why sample register to single URL with the props.
Because
"HFCAClient.createNewInstance("https://localhost:7054", props);"
As I know, there are 2 ORGs in the network.
I just don't know why the CAClient connect to only to ORG1. What about ORG2??
Please help.
RegisterUser, HLF v2.2 Sample

In fabric-samples, they are referring to Org1 only, but you can use Org2 to register the users. You can check the issuer in the certificates and they will be pointing to Org1.

If you download fabric-samples in latest version there is addOrg3 directory in test-network. There is a addorg3.sh file to add the Org3 in the channel along with the config file. you can follow the configuration to add the organization of your own with this template.

Related

Do I need to change the configuration of the admin key after installing APISIX?

After I successfully installed APISIX, I found that the configuration file contains admin key information and all control requests need to contain this credential, do I need to change this configuration? How do I make the change take effect?
for security reasons, we would encourage any users to generate a different API key before using Apache APISIX, please check its documentation[1].
NOTE: API Key is only a string, you can generate a new one in your preferred way. For me, I would use https://www.random.org/strings/.
[1] https://apisix.apache.org/docs/apisix/admin-api/
[2] https://github.com/apache/apisix/blob/master/conf/config.yaml#L46

MIP SDK: fail to create FileHandler with error "Content protected by on prem servers is unsupported"

We are developing an application to open and edit protected PDF files using the MIP SDK (we're currently using version 1.6.103).
So far, we were able to open files protected with different versions of Microsoft protection, including MicrosoftIRMServices version 1.
We are now hitting a problem with one of our customers. They keep their files on a SharePoint 2016 directory, which is configured to automatically add protection to all files uploaded. All their environment is on-premise and AD RMS Service is used for protection. They do not have Azure IP on server side.
When we download the resulting file and try to open, we create a mipns::FileEngine and then invoke CreateFileHandlerAsync() to create a mipns::FileHandler. This call fails with the following mipns::NetworkError:
NetworkError : Content protected by on prem servers is unsupported., NetworkError.Category=FailureResponseCode, HttpRequest.SanitizedUrl=https://api.aadrm.com/my/v2/enduserlicenses,
As the error suggests, I suspect the issue is with the usage of an on-premise protection.
I thought it might be resolved following the instructions at
https://learn.microsoft.com/en-us/information-protection/develop/quick-app-adrms#configuring-protection-api-in-c-to-use-ad-rms
so, following those instructions, I created the FileEngine with
ProtectionEngine::Settings engineSettings("", authDelegate, "");
engineSettings.SetProtectionCloudEndpointBaseUrl("http://<my server>/_wmcs/licensing");
but so far no success, although the error has changed and is now
NetworkError : The protection service is unavailable., NetworkError.Category=FailureResponseCode, HttpRequest.SanitizedUrl=https://<my server>/my/v1/enduserlicenses,
(where of course <my server> is replaced with a local service)
Am I going in the wrong direction? If not, perhaps I am using the wrong endpoint? How can I find the endpoint URL to be passed to SetProtectionCloudEndpointBaseUrl as suggested in the linked page?
Thanks
This is likely caused by a missing MDE install or MDE SRV record. You'll need to validate that mobile device extensions for AD RMS has been deployed and configured. If it has, you'll also need to validate that the SRV record is in place for any mail suffixes your customer is using. For example, if the RMS service is at RMS.FABRIKAM.COM, but your customer email addresses are #Contoso.com, you'd need an SRV record that looks like _rmsdisco._http._tcp.contoso.com which would then point to the server at RMS.FABRIKAM.COM.
The base URL isn't used in consumption scenarios. It's only for publishing. That said, looks like you've set the _wmcs endpoint, but we expect only the base for AD RMS:
ProtectionCloudEndpointBaseUrl = "https://rms.contoso.com"
That's only required when you don't provide a mip::Identity object when creating the file engine. If you do provide the identity, we'll use the domain suffix to look up the DNS record and chase that referral.

Spring cloud config server fetching properties from native location is not working

Hi Please see the project structure of my config file
Include these lines in the yml file
spring.profiles.active=native
spring.cloud.config.server.native.searchlocations =classpath:config/{application}
Here I can able to fetch properties directly under service name ,but don't know how to fetch data from folders like australia,canada .Please help
I solved this issue by providing another search location path in the server . see the below changes
spring.cloud.config.server.native.searchlocations =classpath:config/{application},classpath:config/{application}/{label}
And from the client side I have to make sure that I am passing correct label.
spring.cloud.config.label=australia

Google Cloud and Go creating instances

thanks for looking at my post. i need to create an Linux instance with go lang and display the created public IP on the webpage.
Actually this is well hidden in the API docs.
First you need to get an Google Cloud SDK Client authenticated.
Then you might want to look at the following API operations:
https://godoc.org/google.golang.org/api/compute/v1#InstancesService.Insert
https://godoc.org/google.golang.org/api/compute/v1#Operation
https://godoc.org/google.golang.org/api/compute/v1#InstancesService.List
You should look at http://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/making-requests.html and then calling DescribeInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html), should give you the public IP address.
Some pointers which may help here (haven't used these): https://gist.github.com/stephen-mw/9f289d724c4cfd3c88f2 and http://www.heystephenwood.com/search/label/aws
Hope this helps.

How can I pull the list a user's project through Gitlab API by Laravel?

I'm very new at Gitlab API. I'm using it for my project.
Well, I have one local Gitlab server with many projects (Or maybe it's call "repository") in there.
So, I want to use Laravel to pull some parameter that is list a user's projects by using Gitlab API. Honestly, I have no idea to start this work.
I already read the Gitlab documentation but still can't get it clearly. What I want is the image as below. Could you guys guide me to get this? Thank you very much.
This is what I want.
Here is the GitLab api to read the projects
You can do file-get-contents to read something from api
So, finally as per your gitlab configuration you can do like this to read all the projects
$url = "http://yoururl/api/v4/projects";
$homepage = file_get_contents($url);
echo $homepage;
Hope this helps you.

Resources