Programatically extract service name from TaskHost - winapi

Does anyone know how I can programatically find the service name hosted by a TaskHost instance given it's pid?

Related

Spring security whiltelist incoming service call

In Spring security you can whitelist the incoming IP using hasIpAddress. Is it possible to have a whitelist for the incoming domain/url/servicename?
I have two services in a kubernates cluster, most of their endpoints can only be accessed with the accessed token (legacy filter can't be removed). However, I would like one service to call the other without a token for a particular endpoint (let's say service A call service B). Is it possible to specify the service name rather than the ip to be whitelisted in service B? I don't want to make the endpoint to be publicly accessible. Do I have to convert to IP like this
InetAddress ipaddress = InetAddress.getByName(service);
Is there something smart for Kubernetes services?
Maybe you can try to use the internal kubernetes dns link so you don't have to specify the ip address.

What does the "c" stand for in a Google Cloud Platform internal DNS FQDN?

I'm going through the GCP internal DNS documentation, and am curious about what the c in the FQDN stands for. GCP provides two types of internal DNS types, and the structure of the fully qualified domain names for both types contains a c as per:
[INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal
or:
[INSTANCE_NAME].c.[PROJECT_ID].internal
I can find a reference to all the components of the FQDN but the c. Does anyone know what it is referring to? My best guess here is that it is a reference to a class C network.
It is a subdomain under [PROJECT_ID].internal and GCP VM instance naming convention.
A fully qualified domain name (FQDN) consists of a domain name followed by instance name. As you have seen, GCP has two types of internal DNS (i.e. zonal and global). For Compute Engine, these DNS entries get automatically created under subdomain .c.

Consul: get address of a service from a request

When registering a service in Consul I need to pass Address. But to do so I need to know this address in the first place. This is not always a trivial task if you have multiple network interfaces.
Is there a way to use the source address from the request itself? Wherever it came from just take the source address and use it
The service catalog is a... catalog, the address that services are registered should be accessible by whoever queries the catalog.
I don't believe there's an automatic solution for this, but you can:
register the service multiple times with different tags for the different network interfaces, query the relevant tag.
register the service multiple times with different service names for the different network interfaces. e.g. (myservice-lan1, myservice-lan2). query the relevant service name.
run multiple consul clusters, set with different datacenters and use each subnet as a different datacenter.

Hosting a SaaS application on Service Fabric using multiple application instances

We would like to host our (multi-tenant) SaaS application on one Service Fabric cluster. We would host several application instances of one application type on the cluster, one instance for one tenant. How do we route the tenants to their specific application instance?
You can use the tenant name or identifier as the application instance name. If you need external access, you can use the built-in reverse proxy as a gateway.

Can an Amazon EC2 Instance access another Instance by Private IP?

I have two separate instances in my test scenario
Web Server Instance
Database Server Instance
So far the only way I can get from 1st to 2nd Instance is by having Elastic IP's configured and using the Public DNS (or IP) reference. I can limit unwanted access by configuring the Security Group for 2nd to only take Port 1433 traffic only from 1st.
It seems like Instances within the same Amazon AWS zone should be able to talk to each other more efficiently than first going out and then coming back in.
Is there a way to go directly from 1st to 2nd instance using just the Private DNS (or IP)?
If you are using the Amazon Public DNS name, Amazon makes sure that all internal traffic gets routed internally only. So there is no problem in using the public DNS names. Have a look at this question and this article for more details.

Resources