Jest Client instantiation based on cluster name /https URL/DNS name - elasticsearch

Need to know if implementation of Jest client available for Https URL (not http- since it is available), or accessing Jest client only based on cluster name or based on DNS name.
suggest me if i am not aware of these implementations.
Issue opened on Git hub: https://github.com/searchbox-io/Jest/issues/270
Edited:
Based on the below reference article , https://github.com/searchbox-io/Jest/blob/master/jest/README.md
it is clear Jest supports Https/SSL connections.
Just curious to know if it can support cluster name based configuration i.e without providing host or port details?

I am using Jest client version 0.1.4. Proxy and SSL configurations were not introduced in this version.
But with this following code, able to successfully access cluster URL without providing host and port details.
List<String> connectionUri = new ArrayList<String>();
connectionUri.add("https://search-testing.es.samplews.com");
jestFactory.setHttpClientConfig(new HttpClientConfig
.Builder(connectionUri)
.maxTotalConnection(maxTotalConnection)
.readTimeout(readTimeout)
.connTimeout(connTimeout)
.multiThreaded(true)
.build());
values:
maxTotalConnection = 50, readTimeout=60000, connTimeout=60000

Related

Elasticsearch Cloud Id vs Uri using privateLink connection

we have a security requirement to use private link when connecting to Elastic cluster in elastic cloud.
However when using private link our old solution using Cloud Id connection won't work anymore. We tested it and it is confirmed in this discussion - link
We could switch to using Uri connection however I noticed this sentence in the official docs - link
We recommend using a Cloud ID whenever possible because your client
will be automatically configured for optimal use with Elastic Cloud,
including HTTPS and HTTP compression.
This would be the connection setting we would be using
ConnectionSettings settings =
new ConnectionSettings(new Uri("https://someUri.privatelink.westeurope.azure.elastic-cloud.com:443"))
.DefaultIndex(DefaultIndex)
.EnableDebugMode()
.MaximumRetries(MaxRetries)
.MaxRetryTimeout(MaxRetryTimeout)
.ApiKeyAuthentication(new ApiKeyAuthenticationCredentials("someApiKey"))
.EnableApiVersioningHeader();
Now I'm not sure what the authors in the official docs meant by optimal use with Elastic cloud.
Are there any settings you can think of we should add here for production ready scenarios ? Are there some things that might not work if we go with out the use of Cloud Id ?

1 Client for multiple instances - Spring Authorization server

I have Client that runs on multiple Environments (each env have its own Domain), and have 1 Authorization server that serve all those instances.
Should i create RegisteredClient for each instance, or is it enough to create only 1 client for all instances?
thanks!
Based on the information you've mentioned, you only require a single RegisteredClient. The ProviderSettings and specifically the issuerUri are resolved from the request, so each domain would have a distinct issuer without custom configuration for each instance. See notes on the ProviderContext in the docs.

Getting a 404 when trying to access Database Actions for my ADB with private endpoint

I am getting a 404 when trying to access Database Actions of an Autonomous Database with a private endpoint from my internal environment that is connected through VPN. Anyone know how to fix this?
All Autonomous Database tools are supported in databases configured with private endpoints, but additional configuration is required: to connect from your data center, to resolve the Autonomous Database private endpoint, you need a Fully Qualified Domain Name (FQDN), mapping the private endpoint IP to the FQDN. For that you either need to add an entry into your client's hosts files (e.g. /etc/hosts on Linux) or you can use hybrid DNS in the Oracle Cloud Infrastructure.
In addition to the name resolution, your dynamic routing gateway must allow the traffic to and from the Autonomous Database.
For what it's worth, if you want to learn more about the private endpoint setup, check the official doc and specifically the connection example

WSO2 API Manager - TypeError Failed to Fetch in API Try Out

I have configured WSO2 API Manager 4.0.0 in an AWS EC2 which runs on Amazon Linux 2. I am following this WSO2 documentation to setup my first API. I am accessing the API Manager's Dev Portal via my local machine. I am in Step 3 : Invoking my API.
When I click the Execute button under Try Out for GET requests, I get a 200 OK response, but with an error saying TypeError: Failed to fetch. I have attached a screenshot here.
I feel that the request URL mentioned here ( https://localhost:8243/hello/1.0.0 ) should have the EC2 server's IP address, instead of localhost , but I cannot find a way to modify that. What am I doing wrong here?
Output
Browser's Inspect Console Tab
The Swagger was not able to make the invocation, as it is getting refused. Try updating the API Gateway Environment configurations in the deployment.toml to the Hostnames / IP address (publicly accessible) of the EC2 instance.
Following is a sample TOML configuration of API Gateway Environments. Update the <change-this> with appropriate hostnames.
[[apim.gateway.environment]]
...
ws_endpoint = "ws://<change-this>:9099"
wss_endpoint = "wss://<change-this>:8099"
http_endpoint = "http://<change-this>:${http.nio.port}"
https_endpoint = "https://<change-this>:${https.nio.port}"
websub_event_receiver_http_endpoint = "http://<change-this>:9021"
websub_event_receiver_https_endpoint = "https://<change-this>:8021"
Once the configurations are done, restart the server and invoke the API from the Devportal Swagger UI.

Connection over a proxy Quickfix/n

I am trying to establish a connection with quickfix/n but I am behind the company firewall. So I need to connect over a proxy to the acceptor.
According to the documentation of quickfix/j it is possible via JAVA, however in the documentation of quickfix/n there is no information about possibility of connecting to the acceptor over a proxy via C#.
Is it possible at all to do that from C# with quickfix/n ?
In JAVA this can be done via configuration file, e.g.:
ProxyType=http
ProxyVersion=1.1
ProxyHost=XXX.XXX.XXX.XXX
ProxyPort=YYYY
QuickFix/n v.1.7.0 does not support proxy at all.
QuickFix/n v.1.10.0 does support proxy (automatic via. WebRequest.GetSystemWebProxy()), however it does not support bypassing of the proxy details (user name and password).
I have created my own fork from v1.7.0 that supports user defined proxy (not WebRequest.GetSystemWebProxy) + credentials. This can be found here: https://github.com/mcjacek/quickfixn
ProxyHost=proxy.intranet.yourproxy.com
ProxyPort=8080
ProxyUserName=UserName
ProxyUserNamePassword=Password
I will soon refactor and create PR to merge it to master.

Resources