Cant encrypt using JHipster Registry UI - jhipster

Seems pretty simple, I setup the REGISTRY_KEY using environment variables and am running JHister Registry from the generated jhipster_registry.yml.
Then, I login and navigate over to the encryption UI, enter my secret and hit 'encrypt'...
Where am I going wrong, or is the JHipsterRegistry wrong?

The request to encrypt/decrypt succeeds, but the Angular client throws an error when trying to parse the response as JSON, since the response is actually a string.
This was reported in this issue, and fixed in this commit.
You can build the master branch of JHipster Registry, or wait for a new release to use the UI to encrypt/decrypt.

Related

how to configure graphql url in prefect server 0.13.5

After upgrading from 0.12.2 to 0.13.5 a connectivity issue came up with the graphql component. Prefect server is running in a different server but the graphql url remains http://localhost:4200/graphql. server.ui.graphql_url was working great with version 0.12.2 but now I can't find any way to configure the graphql url properly.
Below you will find the config.toml:
$ cat ~/.prefect/config.toml
[logging]
level = "INFO"
[api]
url = "http://192.168.40.180:4200"
[server.database]
host_port = "6543"
[context.secrets]
SLACK_WEBHOOK_URL = 'https://hooks.slack.com/services/xx/XX/Xx'
[server.ui]
graphql_url = "http://192.168.40.180:4200/graphql"
In the image you can see a POC of the case.
I'm a lit bit confused about the old and the new way to configure the prefect server. Have you any idea about this issue?
EDIT: The ticket I mentioned below has been closed; when 0.13.9 is released, it'll contain a new runtime config apollo_url (which is more accurate since that's the container we're looking for anyway), which is inserted into a static settings file in the UI build, which is fetched when the application starts. This should hit all the points mentioned below.
This is a change from Prefect Server ^0.13.0, which removed the graphql_url variable as a configurable environment variable.
The previous version of Server used a find-replace on the UI code, which is compiled and minified at image build time. The reason for this is that it moves the burden of installing the required Node modules and building the application away from client-side installations and onto Prefect at release-time instead, since these can take a long time (10+ minutes each) in containerized environments. However, the downside is that modifying environment variables, which are injected at build time, requires a less than desirable lookup of the previously-injected variables, which means modifying these requires pulling a new image.
We chose to ship the new version with an in-app input, which allows changing the Server endpoint at browser run-time instead. This gives the flexibility of a single UI instance to connect to any accessible Server installation, leveraging local storage to persist this setting between browser sessions.
That said, we have a ticket open to re-expose the default configuration in a better way than in the previous version. You can follow that ticket here.

Failing APNS for Independent WatchOS6 app

After setting up a new independent WatchOS6 app, which now supports push notifications, getting the device to request the user for push notifications and capturing the push token. I can’t get my server to send a push notification.
With all the correct credentials and P8 set up on my NodeJS server, I have tried to push messages to the device... This is the error all the time:
Status 400 - DeviceTokenNotForTopic - Which according to Apple’s documentation, means that the Topic (BundleId of the app) is wrong. But in this case it is not.
Tried 2 different NPM packages (for elimination)
https://www.npmjs.com/package/node-pushnotifications
https://www.npmjs.com/package/apn
Both providing me with the same issue.
Has anyone successfully managed to complete a Independent WatchOS app with APNs? What am I missing
———
Update
To test the node service, a further 2 tests have been made:
Created a new app, iOS this time, with the same Bundle Identifier, using the pushToken and sending a message the service was successful
Created a new app, another watchOS, with a different Bundle Identifier, this was again rejected but the APNs for the same DeviceTokenNotForTopic issue.
To test production, the only way current is to submit to the store for App Store review. TestFlight option is currently not available for the Watch and there is no way to install a production ad-hoc .ipa manually. Once it is in the store I will continue with further tests.
Problem has been solved.
Xcode has a couple of issues, if you rely on Xcode to sort out your certificates in the developer portal then please don't.
I have been in touch with support and after a few days back and forth with logs it has been made aware that:
Apple's documentation for Independent WatchOS applications does not state anywhere that the topic (which is the bundle id) should be the one ending in .watchkitapp
Xcode does not allow you to add the Push Notification Capability to the .watchkitapp thus meaning it never creates the AppId in your developer portal.
The solution to the problem, I had, was to manually go to the developer portal and add the .watchkitapp AppId and create the certificates, thus allowing my p8 certificate on the server to allow pushes to that particular application.
I use the token based Authentication to send apns notifications.
Finally I found that I forgot to change the value of apns-topic header to watch appid.(form com.xxx to com.xxx.watchkitapp).
Hope this answer can helper others.

401 invalid_client when processing paypal payment using node SDK on production system

I have a weird situation going on, I always get a 401 invalid_client error when trying to make a payment on my production system using the node SDK.
The credentials are a 100% correct, mode property is set to live and this config works on localhost - I can process the payment with no issues. So sandbox works on production and localhost, live works only on localhost. ENV variables are exactly the same when I simulate live mode on localhost. The debug id I get from PayPal is bc930e48644c9. Does anyone have a clue what is going on here?
Issue already set:
https://github.com/paypal/PayPal-node-SDK/issues/320
Seems to occur after the v1.8.0 update of the node sdk. According to the description a rollback of the npm package to v1.7.1 seems to work.
EDIT: Just confirmed that by my self. Works.

Can I get the OpenWhisk Authorization token from the Bluemix web UI?

I've deployed an OpenWhisk action and am successfully invoking it via the request package in a node application. To get things to work I have to pass along an Authorization header in the HTTP request. The value of that header is the base64-encoded version of userid:password.
I can calculate that value at the command line or I can use the -v option of the wsk command to get it, but I can't find it anywhere in the Bluemix web UI. I'm putting together some training materials and would rather not send my users to the command line if I can help it.
Does anybody know how to get this value through the Bluemix UI? If it's there, I haven't seen it.
Just navigate to the CLI setup page on Bluemix. You'll find a box containing the commands to setup your CLI for local usage. That one contains the API key.

uber api - Take Me Home Now app - invalid access token - node JS

I'm trying to implement this prototype app: https://github.com/agraebe/Take-Me-Home-Now As a disclaimer, I'm fairly new to Node JS and API integration. I'd like to get the code functioning to show that I properly implement this OAuth2 workflow, and saw this app as a good way to practice that.
I'm having trouble obtaining an access token and receive the error: Invalid access token when I go to localhost:1455, and then click the "Login to request ride" button.
I've seen various reasons on stackoverflow. One could be that I need to have requests approved by Uber. I wouldn't think so though, since the code is using sandbox and not production.
My redirect uri is set as https://login.uber.com/oauth/v2/authorize?client_id=client_id&response_type=code with "client_id" set as my client id in that link. I've made sure the redirect uri matches what I have in the app developer account page.
Also, I've hard coded the details into the config.js file, since I've seen someone mention on stackoverflow that storing the environment variables could be an issue from the error I was receiving.
please help...
thanks!
I created the Take-Me-Home-Now app. Assuming you already installed all the dependencies (npm install in the project root folder), here are some things to consider:
You should disable your ad-blocker to ensure that's not the issue
You have to configure your app in the Uber Developer Dashboard:
Create a new app
Go to the authorizations tab and set the following configuration:
redirect url: http://localhost:1455/api/callback
origin url: http://localhost:1455/
general scopes: enable all the scopes (except for the priviliged ones)
Go to the settings tab and copy over the required credentials (client id, server token, and client secret). You will need them to start the NodeJS server, like this: client_id=[1] client_secret=[2] server_token=[3] redirect_uri=[4] mashape_key=[5] node app.js
In order to make use of the gender-awareness feature, you'd need to get an account with Mashape (Face++). As you might have realized already, the start command above also requires this key.
When you register your app with uber, you will have to define a callback URL. Even if it is your development machine (i.e. localhost:1455) When you send the request to the Auth server, you provide a client_id, response_type and callback_url.
When the user successfully authenticates, Uber sends back a code (hence the response_type=code) as a URL parameter to your callback URL. This code is NOT the token. This code is then used to get the token using the client_id, client_secret and code.
I would suggest doing some reading on how oAuth works to get a better understanding.

Resources