Configure Artifactory to proxy Remote Repository via Proxy - artifactory

First I created a proxy configuration in Artifactory with required host IP and port then I configured for the maven remote repo:
http://repo.maven.apache.org/maven2/
I selected "maven" for package type, "maven-2-default" for repository layout and remote layout mapping, selected the proxy key (Artifactory identifier) under the network tab. But clicking "test" yields:
Connection failed: Error 403: Forbidden (on a popup window, no logging)
That is, no information appears in the Artifactory logs when using the "test" connection button; however, the 403 connection failed error always pops up with the button.
On a browser, an error is logged when navigating to:
https://{private name}/artifactory/list/{artifactory name for proxy repo}/
The error is:
{date time} [http-nio-8085-exec-5] [INFO ] (o.a.r.RemoteRepoBase:940) - Error listing remote resources http://repo1.maven.org/maven2/: Unable to retrieve http://repo1.maven.org/maven2/: 403: Forbidden (remote response: 403: Forbidden)
The server.xml file for Catalina shows that a connection is setup with port 8085, redirect 8443, UTF-8, and as shown above the default protocol is http nio.
Performing the following operation from the Artifactory server works fine and returns the html page, index of maven 2.
curl -x {proxy IP}:{proxy port} http://repo.maven.apache.org/maven2/
Without Artifactory, maven command-line, lifecycle operations work using the proxy. The proxy and an active profile configuration with the repository url info were added to the maven settings.xml file.
LDAP settings in Artifactory appear to be working fine. The test button for the ldap settings yield "Successfully connected and authenticated the test user."
The permissions settings are set to allow manage for the account connected via the Artifactory UI.
There are other, similar questions but a relevant solution to this problem is not discussed:
Maven Github repository + Artifactory
How to debug HTTP Proxy problems with artifactory?

Related

Pull Replication for Remote Repository from instance artifactory 6 to instance artifactory 7 don´t

I'm new artifactory user and I want to make a replication of a remote repository called "roti_conan"
from my artifactory instance server 6.22.5 to instance artifactory 7.23.5 on "rotifiles_conan".
To do that I used the pull Replication for remote repos ,but when I changed and put the new URL
(https://artifactory.roti.local/artifactory/rotifiles_conan/) inside edit of "roti_conan" to get a connection bethween the remote repositories , I get this failure :
Error testing pull replication config: Unable to identify target URL as an Artifactory instance: HTTP/1.1 404 Not Found .
What can I do to fixe that ? It is possible for me to use the "event-based pull Replication" to resolve that ? If yes, how can I use it ?
Thank you so much
Romeo
I understood you are configuring the smart remote repository for Conan and then enable the pull replication. The 404 is expected because the URL should include "api/conan" context in it. Change the URL to below and test the connection,
https://artifactory.roti.local/artifactory/api/conan/rotifiles_conan

Wso2 admin/admin failing after changing to mysql datasource

I was facing issue while login to Carbon Management Console
Version; WSO2 IS 5.10. 0 as Key Manager
Changes:
I have made Mysql database changes for WSO2AM_DB, WSO2Shared_DB,WSO2User_db in deployment.toml file.
When i tried login Management Console with default admin/admin credentials, I am getting error in UI:
Login failed! Please recheck the username and password and try again.
ERROR {org.wso2.carbon.core.services.authentication.AuthenticationAdmin} - System error while Authenticating/Authorizing User : com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
Also user store changes in deployment.toml cause error
Changes:
[user_store]
type = "database"
[user_store.properties]
TenantManager="org.wso2.carbon.user.core.tenant.JDBCTenantManager"
ReadOnly=false
ReadGroups=true
WriteGroups=true
scim_enabled = true
[realm_manager]
data_source = "WSO2USER_DB"
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure normally means the configured database is not accessible.
Did you define the database.user configuration in the deployment.toml according to WSO2 jdbc user configuration guidelines? If this is already configured, check the configured connection url and network connectivity from WSO2-IS to userstore database.

Fail to open kibana homepage from development environment

I'm setup kibana local development by following up the wiki from
https://github.com/elastic/kibana/blob/7.1/CONTRIBUTING.md#setting-up-your-development-environment
yarn es snapshot
i'm able to run elastichsearch locally at http://localhost:9200/ with above cli.
yarn start
i'm able to start the server for kibana with above cli, and according to log, it promote me to open http://localhost:5601/ykl,
server log [15:57:39.991] [info][listening] Server running at http://localhost:5603/ykl
server log [15:57:40.150] [info][status][plugin:spaces#8.0.0] Status changed from yellow to green - Ready
after i logined with default user/password, it return back a error response.
{"statusCode":403,"error":"Forbidden","message":"Forbidden"}
I'm not able to access page
http://localhost:5601/ykl/app/kibana#/management,
it will redirect me to http://localhost:5601/ykl/#/management with error response just as above error json response.
My question is what's wrong with the default user account to access homepage? how to change kibana configuration to allow me to access homepage.
ps:
I'm able to open status page without any problem http://localhost:5601/ykl/status#?_g=()
I found answer myself.
just use another default user account which has permission, actually, i login with elastic and it works
https://www.elastic.co/guide/en/elastic-stack-overview/7.1/built-in-users.html

How to use Firebase behind Firewall / Proxy?

We are running a simple application that connects to Firebase are reads some data. It fails to connect with the following timeout error:
#firebase/database: FIREBASE WARNING: {"code":"app/invalid-credential",
"message":"Credential implementation provided to initializeApp()
via the \"credential\" property failed to fetch a valid Google OAuth2 access token
with the following error: \"Failed to parse access token response: Error: Error
while making request: connect ETIMEDOUT
We are behind Firewall / Proxy and it appears that is blocking traffic to/from Firebase and hence failed connection. My question is what ports need to be opened and to what destination URLs to make this application work normally?
Any help will be much appreciated!
Finally, after struggling with the issue for several days got it working. Needed to contact network team and request to perform following actions:
Open ports 5228, 5229, 5230 for Firebase communication.
Opened communication at proxy level between the source server and following URLs:
fcm.googleapis.com
gcm-http.googleapis.com
accounts.google.com
{project-name}.firebaseio.com
Added following code in my node.js application:
var globalTunnel = require('global-tunnel-ng');
globalTunnel.initialize({
host: '<proxy-url>',
port: <proxy-port>,
//proxyAuth: 'userId:password', // optional authentication
sockets: 50 // optional pool size for each http and https
});
Installed module global-tunnel-ng:
npm install global-tunnel-ng
It solved the my problem and I hope it can help others too. :-)
I used Wireshark to monitor a local install of a Node.js application using the Admin SDK for firestore. I also referenced this list by Netify. This is what I found:
*.firebaseio.com
*.google.com
*.google-analytics.com
*.googleapis.com
*.firebase.com
*.firebaseapp.com

Calling Remote Web Service -- "The request failed with HTTP status 401: Unauthorized"

I am calling a remote service and authenticating using a certificate. When testing with a Console App, everything works fine. When calling from an ASP.NET Website (.NET 4.0, IIS7) I receive a response code of 401 -- Unauthorized.
I am adding the certificate using code such as:
var client = new TheGeneratedProxy();
client.ClientCertificates.Add(new X509Certificate("D:\cert.pfx", "myPassword"));
(NOTE: I have also loaded the .pfx into the local Certificate Store using IE. The certificate is loaded into my "Personal" store -- so I suspect this to be the problem, since the Website will be running under a different account.)
I think the problem is that your IIS user (Network Service / ASPNET) doesn't have access to the certificate. In order to grant Network Service to access the certificate in the store, download the following tool: winhttpcertcfg (http://www.microsoft.com/downloads/details.aspx?familyid=c42e27ac-3409-40e9-8667-c748e422833f&displaylang=en)
Now open command prompt and type:
winhttpcertcfg –g –c LOCAL_MACHINE\My –s ORGNAME –a "Network Service"
Please note that "Network Service" can be substituted with any other account. I.e. if you you have configured a custom user for your app pool, you should put this user as the value for the -a parameter.
ORGNAME should be substituted with the Organisation name you specified during the creation of your cert.

Resources