How do I configure crafter profile client and crafter profile admin console with non-default crafter profile URL? - crafter-cms

The default configuration of crafter profile is http://localhost:8080/crafter-profile for Crafter Profile Client and Crafter Profile Admin Console. I have installed Crafter Profile on port 7070 and updated the following property in the extension folder:
/shared/classes/crafter/engine/extension/server-config.properties
crafter.profile.rest.client.url.base=http://localhost:7070/crafter-profile
But both instances are still looking for crafter-profile at port 8080.
[WARN] 2017-06-07 13:16:23,158 [ajp-nio-7009-exec-71] [rest.RestTemplate] | GET request for "http://localhost:8080/crafter-profile/api/1/profile/by_ticket.json?accessTokenId=b4d44030-d0af-11e3-9c1a-0800200c
2017-06-07_13:17:11.085 [http-nio-7070-exec-62] WARN o.c.commons.rest.RestTemplate - GET request for "http://localhost:8080/crafter-profile/api/1/tenant/all.json?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d" resulted in 404 (); invoking error handler

For Crafter-Profile-Admin console that property (crafter.profile.rest.client.url.base) should be in this file
crafter/profile/management/extension/server-config.properties under tomcat shared folder.
When using the crafter-profile-client in spring context you should make sure that your spring context read a property file which and override of the key

Related

Netlify CMS - Uploadcare - Missing External Media Library

My website deploys correctly but whenever I try to access my Netlify CMS admin panel I get this error:
Error loading the CMS configuration
Config Errors:
Error: Missing external media library ‘uploadcare’. Please use ‘registerMediaLibrary’ to register it.
Check your config.yml file.
Here is my config.yml file: https://pastebin.com/raw/gHzhvTGG
Here is my cms.js file: https://pastebin.com/raw/wMGtkKwm
Uploadcare has been registered and it has a valid api key. It was working fine previously.
I am running out of things to try

openapi.json not found when hosting NetCore 3.1 Web Api on IIS

I generated my server stub for ASP.NET Core 3.1 using the openapi generator with the following command:
npx #openapitools/openapi-generator-cli generate -i myapi.json -g aspnetcore -o C:\myapi --additional-properties aspnetCoreVersion=3.1
After opening that project in Visual Studio 2019 and running it I get the swagger page where I can try out the different endpoints. So far OK.
However: after publishing this on our IIS Server and visiting the proper URL that swagger page is loading with the error:
Not found: /swagger/1.0.0/openapi.json
Swagger error on IIS
The endpoint itself (GET request) can be reached.
The Swagger Endpoint code in startup.cs is the default code as it was generated by open-api generator:
app.UseSwagger(c =>
{
c.RouteTemplate = "swagger/{documentName}/openapi.json";
})
.UseSwaggerUI(c =>
{
//TODO: Either use the SwaggerGen generated Swagger contract (generated from C# classes)
c.SwaggerEndpoint("/swagger/1.0.0/openapi.json", "Swagger WP RUH Delivery");
//TODO: Or alternatively use the original Swagger contract that's included in the static files
// c.SwaggerEndpoint("/openapi-original.json", "Swagger WP RUH Delivery Original");
});
Why is this Swagger page working on my machine, but on IIS things go wrong?
I found some hints on changing the c.SwaggerEndpoint in startup.cs, but nothing helped.
Try to remove /swagger/ from the URL path:
c.SwaggerEndpoint("1.0.0/openapi.json", "Swagger WP RUH Delivery")

Solr Security : authentication/authorization Not recognized

I am currently working on Solr in Standalone Mode.
Since I'm a beginner on Solr I wanted to start the server with the command start -e techproducts.
The core is well uploaded but a warning message appears:
"Not all security plugins configured! authentication= disabled authorization = disabled. Solr is only as secure as you make it. Considere configuring authentication/authorization before exposing solr to users internal or external"
The problem is that I have already created my security.json, I have put it in the home directory and I have authenticated myself at the server entrance, so it's seems efficient. Why does this warning message keep appearing?
Try writing the security.json file in the proper place, so that Solr can read during startup.
Visit the Dashboard page and look for the solr.solr.home property which should look like this: -Dsolr.solr.home=/var/solr/data, then you write the file to /var/solr/data/security.json. Then restart Solr and during startup the console should show something like thi instead of the WARN:
INFO (main) [ ] o.a.s.c.CoreContainer Initializing authorization plugin: solr.RuleBasedAuthorizationPlugin
INFO (main) [ ] o.a.s.c.CoreContainer Initializing authentication plugin: solr.BasicAuthPlugin

How do i use the Kenitco API from a Console App

I'm using Kentico V10 and I can run the website locally. However, when i try to use the API from a console app, i'm getting the following error.
{"Object type 'cms.class' not found."}
The stackTrace has a call to check license. I'm following this page, and it says you have to add a license for your domain, but what domain is used when you are running from a console app?
https://docs.kentico.com/k10/integrating-3rd-party-systems/using-the-kentico-api-externally
I'm using this code from taken from this page.
https://docs.kentico.com/k10/managing-users/user-registration-and-authentication/configuring-single-sign-on
CMS.DataEngine.CMSApplication.Init();
string userName = "myuser";
// Gets the user with the specified user name
UserInfo userInfo = UserInfoProvider.GetUserInfo(userName);
// Gets the authentication URL for a specified user and target URL
string url = AuthenticationHelper.GetUserAuthenticationUrl(userInfo, "SecuredSurvey");
If that was available via the REST API, i'd be happy to get the URL that way, but from what i can see, it's not available.
-Randy
Kentico has some good documentation on how to use the API in an external application, specifically a console library here.
Very notable steps are:
Connecting to the database; make sure you use the same connection string as in your web.config
Install the Kentico.Libraries NuGet package
Initialize Kentico in your application in the Global.asax file.
Write custom code all day long.

Cannot open URL in UIWebView in ios 9.0

I get the following message when i try to open a URL in UIWebView-
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
I already tried the method given here but I get the same error report at the console
NSAppTransportSecurity add to info.plist , data type is Dictionary, then add an item NSAllowsArbitraryLoads , which is boolean value and set it to YES, then restart the Xcode project and run.
NSAppTransportSecurity: -
A dictionary containing the settings for overriding default App Transport Security behaviors. The top level key for the app’s Info.plist file.

Resources