gRPC with HTTP+JSON Gateway - reverse-proxy

I am trying to build a gRPC service in Java. I also want to serve HTTP+JSON requests. I read about Envoy and grpc-gateway for creating a reverse proxy. But I am not able to do so effectively. I have added google.api.http option in proto file but I am stuck here.
Can anyone tell how to go about this problem with some steps? Thank You in advance.

Is this the one https://github.com/grpc-ecosystem/grpc-gateway you are using? Have you searched there for help?

Related

How to use SSL in MariaDB datasource with quarkus?

I would like to connect to MariaDB database via SSL in Quarkus application. However, I cannot find a way how to define the SSL-related information in Quarkus application.
How to provide the certificate which is needed in database connection in Quarkus application?
Is it even possible?
If not, I assume that many would be interested in that feature.
I searched information from https://quarkus.io/guides/datasource but did not find anything regarding this.
MariaDB reference: https://mariadb.com/kb/en/library/using-tls-ssl-with-mariadb-java-connector/
There's no reason for it to not work. Just include what you need in your JDBC url.
Be aware though that if you are using native images, you should read this guide that will guide you through configuring everything properly: https://quarkus.io/guides/native-and-ssl .

how to turn off ssl check in Authlib

I'm using authlib in my project. I have a local IDP setup using http atm.
For testing, this code is blocking me because my dev environment is http.
https://github.com/lepture/authlib/blob/master/authlib/client/oauth2.py#L155
I can carry on by commenting out the line. But, i think having a way to turn of https check is neater.
So, dose anyway know a way to turn off https check in Authlib ?
It can be solved by setting an environment:
AUTHLIB_INSECURE_TRANSPORT=true
This is not documented on client sections, it is documented on the server parts like https://docs.authlib.org/en/latest/flask/oauth2.html

what does “GCMRegsistrar.register” do?

follow this link:https://developer.android.com/guide/google/gcm/demo.html
At home i can run the gcm demo successfully.
But in the company, it runs failed with ‘authentication failed’
I think there is something wrong with the networks in my workplace(blocked ip or Protocol).
Because i cant find the source code of gcm jars.
So,does anyone know what happened when the client invoke the ‘GCMRegsistrar.register’?
I want to ask our network admin to help me to solve this problem.
I've got the Answer:https://groups.google.com/forum/#!topic/android-gcm/7qPUp0Ym3Ak
Note:
If your organization has a firewall that restricts the traffic to or from the Internet, you'll need to configure it to allow connectivity with GCM. The ports to open are: 5228, 5229, and 5230. GCM typically only uses 5228, but it sometimes uses 5229 and 5230. GCM doesn't provide specific IPs. It changes IPs frequently. We recommend against using ACLs but if you must use them, take a broad approach such as the method suggested in this support link.
It is helpful to me.
You can find this kind of answers in the offical documentation, here.
Considering this, register() method is the one responsible for
Initiate messaging registration for the current application.
You should take a look at method description, here.

Using erldis on ejabberd Module?

I'm working on an ejabberd module that requires erldis.
I'm having problems starting the rldis application from in the ejabberd module initialization.
Any tips, tutorial on how to integrate? Which files are required to be copied to ejabberd/ebin? What is the recommended start sequence?
I have found this example of using Redis with ejabberd:
http://logicalfriday.com/2011/06/30/ejabberd-global-roster/
A quick read shows that it is not totally integrated in ejabberd (even in term of start / stop), but that can help.
I do not know what your module is supposed to do, so it is hard to suggest a better approach at this stage.
I did similar here: https://github.com/bob-p/mod_global_roster this might give you a few pointers.

Apache HTTP Filter/Logging

I am using IBM HTTP Server 6.1 / Apache 2.0.47. I would like to pull a specific piece of data out of all requests coming through the HTTP server and if it exists log the found data along with the target URL. It needs to be as efficient as possible.
Is a filter appropriate or a handler?
Does a filter/handler exist that I can configure and use as is or do I need to write something? How do I configure, or write this?
Thanks.
You could use mod_security apache module , which have a good audit log tool SecAuditLog (log all headers), that you can declench by http status. You'll find as well fine filters, that will maybe fits your needs.
And do not hesitate to ask servfault gurus on that.