How to disable SSL in WSO2 APIM 3.0.0? - wso2-api-manager

I'm running WSO2APIM 3.0.0 in Openshift. I'm trying disable SSL in WSO2APIM which mean WSO2APIM will only run on HTTP ( no longer HTTPS). I added this configure to deployment.toml:
[transport.https.properties]
enable = false
But it seems to not work.
I think that, in this new version of WSO2APIM 3.0.0, we just need to configure in deployment.toml.
So is there some guide to solve this ? And I need some reference which describe all properties I can configure in deployment.toml.
Thank you all.

You can add the following properties as system properties to wso2server.sh file which resides in wso2am-3.0.0/bin location.
-Dhttpclient.hostnameVerifier=AllowAll \
-Dorg.opensaml.httpclient.https.disableHostnameVerification=true \
Please refer https://docs.wso2.com/display/ADMIN44x/Enabling+HostName+Verification

Related

Can't access kibana with domain

I generated certs for my app using certbot/Letsencrypt. I got two pem files which I added in my kibana.yml file. When I try to access kibana through https://domainName:5601 I get timeout error, while I can access it with IP. Am I missing something?
This is my kibana.yml:
server.name: kibana
server.host: "0.0.0.0"
server.ssl.enabled: true
server.ssl.certificate: "/usr/share/kibana/config/certs/fullchain.pem"
server.ssl.key: "/usr/share/kibana/config/certs/privkey.pem"
If you upgraded with the latest version i.e. 7.x then u need to add server.publicBaseUrl in your kibana.yml
for e.g. server.publicBaseUrl=xyz.com
so it will allow you to redirect your website.
For me it is working fine after adding this parameter inside kibana.yml

Auth fail when running `sbt new`

Here's a transcript so far:
$ sbt new lagom/lagom-scala.g8
[info] Loading global plugins from /Users/abrahma/.sbt/1.0/plugins
[info] Set current project to lagomlife (in build file:/Users/abrahma/Bitbucket/Practice-Scala/LagomLife/)
[info] Set current project to lagomlife (in build file:/Users/abrahma/Bitbucket/Practice-Scala/LagomLife/)
ssh://git#github.com/lagom/lagom-scala.g8.git: Auth fail
I've verified authentication with
GitHub:
$ ssh -T git#github.com
Hi agam! You've successfully authenticated, but GitHub does not provide shell access.
Also verified that I can access the repo in question (i.e. I can do the following, in a separate location):
git clone ssh://git#github.com/lagom/lagom-scala.g8.git
Edit: fwiw I'm able to work around whatever the root cause is here:
git clone ssh://git#github.com/lagom/lagom-scala.g8.git
g8 file:///Users/abrahma/tmp/lagom-scala.g8
I ran into this problem as well, and solved it by removing the following from my ~/.gitconfig:
[url "git#github.com:"]
insteadOf = https://github.com/
Are you using OpenSSH 7.8 or newer, and have you recently created your private key?
If so you might be running into the issue described in “Invalid privatekey” when using JSch aka jsch#129.
The root cause was discovered to be the ssh private key mismatch.
The question has a workaround to convert the key file to an older format if that's the error you're seeing.
You need to add your SSH key to the agent:
ssh-add ~/.ssh/id_rsa

How to use install_github behind a proxy?

I've finally managed to make my proxy settings work for GitHub cloning, using the following code :
options(rsconnect.http = "internal")
Sys.setenv(http_proxy = "http://proxy.lala.blabla:8080")
Sys.setenv(https_proxy = "https://proxy.lala.blabla:8080")
I can now clone github projects using File > New Project > Version control.
But I can't install from github :'(
require(devtools)
install_github("this/that")
--> Installation failed: Could not resolve host: raw.githubusercontent.com
People seem to use the following command :
http::set_config(use_proxy(...))
But that would force me to explicitely write my login / pass, which I don't want to do. I'd rather use the default ones that are associated to
options(rsconnect.http = "internal")
How can I configure the proxy here, without writing my login/pass please ?
devtools uses httr under the hoods, see e.g. devtools:::remote_package_name.github_remote or devtools:::remote_download.github_remote.
That is why it requires you to set the proxy in the httr::set_config(httr::use_proxy(...)) way.
I would suggest that you just pick up the information from the environment variables and pass the elements to httr::set_config(httr::use_proxy(...)). Then you don't need to type your settings in the code.

How to delete GAVs in Nexus 3 through Nexus REST API

Is there a way to delete GAVs through a REST API in Nexus 3? From various
google searches it appears that this capability existed in Nexus 2, but not in
Nexus 3 yet. Is that true?
I tried the following with my current Nexus installation, which is OSS 3.2.1-01:
I was trying to delete GAV:
groupId = org.mycompany.myproject
artifactId = myartifact
version = 1.0.0
$ curl --request DELETE --user "USERNAME:PASSWORD" --write-out '%{http_code}\n' http://my-server:8081/service/local/repositories/my-repo/content/org.mycompany.myproject/myartifact/1.0.0
This gave me a 405.
I also looked at the release notes for 3.3 through 3.5 and nothing jumped out
that REST API support was added.
I also looked into
https://help.sonatype.com/display/NXRM3/REST+and+Integration+API. I downloaded
the nexus-book-examples and downloaded several of the Javadocs (nexus-core,
nexus-repository, nexus-common, nexus-script, nexus-commands, nexus-selector)
for version 3.2.1-01 and started to look through the code. It was not clear
where to start with a simple program to delete GAVs.
Am I correct that you cannot delete GAVs through the REST API in Nexus 3? Is
there a plan to support this in a future Nexus 3 release? Is there a way to do
what I want to do by creating a Groovy script using the code referenced by the
REST+and+Integration+API link above? Is there some sample code which will help
bootstrap me to using the above code (either 3.2.1-01, or a newer version of
Nexus).
Thanks.
You might take a look at our Beta REST API in Nexus Repository 3. Upgrade to a version greater than 3.3, preferably to 3.5 (just so you are using latest and greatest) and navigate to:
http://nexushostname:nexusport/swagger-ui/
Since the REST API is currently Beta we have yet to publish documentation or fanfare around it while we let people experiment with it and give us feedback.
You should see endpoints for deleting components and assets. You will likely want to use the component delete, so that it will clean up all associated assets.
Let me know your mileage!
According to the documentation, you can delete an ASSET (individual file) or a COMPONENT (a set of files, like jar+md5+sha1+pom.xml representing an artifact) only if you know the assetId or the componentId
https://help.sonatype.com/repomanager3/rest-and-integration-api/components-api
https://help.sonatype.com/repomanager3/rest-and-integration-api/assets-api
So you should issue a separate search call passing the GAV and finding out the componentId, then use the componentId to delete in a second call.
However I see here https://issues.sonatype.org/browse/NEXUS-11266 and here
https://issues.sonatype.org/browse/NEXUS-11881 that people can delete an asset just by specifying the entire path... I have tried with
curl -u admin:admin123 -X "DELETE" -w "%{http_code}" http://localhost:8081/repository/deployments/org/apache/commons/commons-compress/1.18/commons-compress-1.18.jar
and it gives me a HTTP 204 (no content). In my case "deployments" is a hosted repository. I have tried the same command on "central" (aproxy repo) and I get a 405.
But if I try to download the whole component (including pom, sha1 etc) with
curl -u admin:admin123 -X "DELETE" -w "%{http_code}" http://localhost:8081/repository/deployments/org/apache/commons/commons-compress/1.18/
I get a HTTP 404.
I know, it's painful and in Nexus2 it was much easier.

Nagios won't run when I add this

I want to be able to check if my site is up and monitor it by nagios locally.
So I went to this site http://www.linickx.com/nagios which made the following, now while I cant see hosts.cfg so I created it and also services.cfg I had to create as well:
hosts.cfg
# host definition for bonus
define host{
use generic-host ; Name of host template to use
host_name bonus
alias bonus
address 92.12.35.162
check_command check-host-alive
max_check_attempts 10
notification_interval 120
notification_period 24x7
notification_options d,u,r}
services config
The following should appended to the end of hosts.cfg (located in /etc/nagios or /usr/local/nagios/etc)
# Service definition for bonus
define service{
use generic-service ; Name of service template to use
host_name bonus
service_description HTTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups technical,support
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_http
}
How can I get this to work please?
Nagios won't add new configuration files unless either the file or directory is specified in the main nagios.cfg. Also, the new object configurations won't be added until you restart the Nagios process. Can you give some more detail as to how you installed Nagios (source or package) and what linux distro you're on?
Here are some additional resources:
Nagios Core Documentation
http://nagios.sourceforge.net/docs/3_0/
Nagios Core Support Forum
http://support.nagios.com/forum/viewforum.php?f=7

Resources