what does “GCMRegsistrar.register” do? - android-c2dm

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.

Related

Restrict network access from Apptainer/Singularity container

Is it possible with Apptainer/Singularity to restrict which network interfaces can be used from within a container?
In my specific use-case I want to allow access to the internet but block access to some SocketCAN interfaces that are available on the host system. Is this possible?
I saw the --net/--network options but the documentation on this option not very detailed so I'm not sure how to use it (or if it can solve my problem at all).
I got the answer from the Apptainer Slack channel (thanks to Cedric Clerget!):
In my specific case (allowing normal network access but hiding the SocketCAN interfaces), it is actually enough to add
--dns <IP of DNS server> --net --network=bridge # or --network=ptp
Specifying the DNS server is needed when using systemd resolved. In other cases it may work without.

Is there a good description to enable https for ejabberd?

I have installed ejabberd on a vm and i successfully made accounts and accessed the admin panel. I have tried to get https enabled via lets encrypt but i havent managed to get it running. After checking the docs, google as well as the forum here i still didnt find a useful description to get this done.
thanks in advance for any further information on that note.
There are a pair of paragraphs regarding Let’s Encrypt SSL certificates in this tutorial: https://www.process-one.net/blog/how-to-move-the-office-to-real-time-im-on-ejabberd/
Once you have setup the certificates, you can enable the tls option in several listeners, like ejabberd_c2s, and probably you want to enable in ejabberd_http too. See the first example here, concretely the configuration of port 5281:
https://docs.ejabberd.im/admin/configuration/listen/#examples

Setting up an agent authentification with Pingaccess

I have a CentOS VM with an ready installed Pingaccess Server Testenvironment with access to the Pingaccess Admin UI.
Now I would need to set up an Agent-Authentification on the system but sadly have no experience configuring Pingaccess sofar. I also find it dificult to find documentation to complete my task.
I would appreciate any hints and pointers in right direction or information on how this kind of setup can be configured and what else I might need? Is it even possible to set it up in a local VM?
Here a slightly more detailed description of the scenario:
An application that itself is not able to use a corresponding protocol (Oauth, SAML2, ...) (e.g. a small PHP script or something similar) that cannot do anything other than output a user name that it reads from the HTTP headers.
Set up an Agent that extends the header attributes and e.g. something like Header-UserName. The application can then access the web server variables and use these values without having to worry about how the authentication works. The agent, on the other hand, can do the protocols and handle authentication via the server (here PingAccess).
Thanks a lot in advance.

firebase ssl generation takes over 24 hours

Its a pity google does not offer its domain service in Germany, otherwise launching a react website vial firebase would really be super easy, great service!
The only problem I faced is that the SSL generation seam not to work as described in the documentation.
In Firebase Hosting it keeps on saying: Needs setup
And the documentations says on that topic:
In most cases, your DNS A records haven't propagated from your domain
name provider to Firebase Hosting servers. Troubleshooting tip: If
it's been more than 24 hours, check that you've pointed your records
to Firebase Hosting.
By pointing the records I assume they mean adding two A Type files with provided IP´s.
I added those more than 24 Hours ago and they are as valid as they can be, I checked them multiple times now on my DNS provider checkdomain.de.
Or am I getting something wrong here?
Thanks for any help!
Ok, the problem was that the provider had an additional field outside of the "repository scope" which was titled main IP. This IP also translated into a A entry which could be discovered by the prompt suggested by #FrankvanPuffelen (thanks for that):
dig +noall +answer <your-domain-name>
One the field value has also been changed to one of the IP's provided by firebase the SSL Certificate has been successfully generated.
I hope that it does help someone else in the same situation and I'll try to convince firebase support to add those hints to the documentation.

SSL Proxy / Decryption?

One of my clients just received the software ordered from his chosen developers, asked me to look at it and prepare the hosting procedures.
It's an Java (jar) app, so far so good ... but I saw something suspect, every 60 minutes or so the software connects to a remote host :443 port using SSL and transferring ~ 3-10 MB of encrypted data (as POST) then closes the connection, this is very strange. Tried to wireshark it but everything is encrypted and I have no clue about what kind of data is transferred, I know only the destination hostname. The hosted data within the app will be highly sensitive (insurance-broker) and if my client decides to go with it - this is a serious issue for his business and also for his clients, I've asked the developer company about this and they said that no one added something like this even if I provided them the proff (pcap).
I can block it within firewall, but if they added something like this it could exist another hosts ready to receive the encrypted data.
The only way I can figure it out is to somehow decrypt the SSL traffic in order to read RAW data and give my client all the needed informations in order to talk with the developer company to sort it out, how can I do that ? With some sort of ssl-proxy or whatever ... tried to google it but didn't find any kind of relevant tutorials.
I have access to the physical machine which is running the Java application, I can see every single bit of the traffic but ... encrypted.
If I was in your place instead of trying to decrypt ssl connection would have tried following steps:
1)Since you are aware of the host to which it is making a post request , find out more about that service so as to learn what it does ? May be try contacting that site saying that we need to consume your service what should I send my in post request ;)
2)Second way around would be if you can decompile the jar file and find line in the source code which makes that request and then you could go back to the developer asking as why this has been written. To find the source code which is making the call what you could do is block the host access on your firewall.
The code would fail and mostly probably he would have logged the exception in his log files. Find the stack trace and you will know the line of code that is
making that request.
Hope this helps.