File Upload Utility

I am receiving below “Connection Timeout” in our env, what are the parameters that I will need to check to resolve the issue. Please advise.

Command used=> java -jar FileUploadUtility.jar --url https://xx.identitynow.com --clientId xx --clientSecret xx --file D:\sailpoint\xx -R

Scope of PAT used in jar file=> sp:scopes:all

<
java.net.SocketTimeoutException: Connect timed out
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:546)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:333)
at java.base/java.net.Socket.connect(Socket.java:648)
        at okhttp3.internal.platform.Platform.connectSocket(Platform.java:130)
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:263)
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:183)
        at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
        at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
        at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
        at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
        at okhttp3.RealCall.execute(RealCall.java:81)
        at retrofit2.OkHttpCall.execute(OkHttpCall.java:207)
        at sailpoint.service.SailPointService.createSession(SailPointService.java:110)
        at sailpoint.utils.FileUploadUtility.call(FileUploadUtility.java:235)
        at sailpoint.utils.FileUploadUtility.main(FileUploadUtility.java:145)/>

From Troubleshooting section on Timeouts:

Timeouts are usually an indication that File Upload Utility is attempting to communicate with the SailPoint Cloud and not getting a response. Usually, this due to network security controls, such as firewalls, preventing the communication. Work with your network teams to make sure you can reach the SailPoint Cloud, and if necessary, adjust Timeout Configurations or even leverage Proxy Configurations if so required.

Hope this helps!

2 Likes

Did we get the powershell script that has been used in this video?

Hi Shantha,
Are you referring the the script that was used in Krish’s livestream last week? If yes, he’s in the process of submitting it to the CoLab :slight_smile:

1 Like

Got help from Support - it’s literally just replacing the current .jar file with the new .jar - no commands actually need run. You can get the new version from the Current Release link at the top of this page.

2 Likes

I understand that UTF-8 (Unicode) is the supported character code for multibyte data(account entitlement), is that correct?
In Japan, there are still cases where other character encodings such as Shift JIS are used, but after converting to UTF-8, it is necessary to use it, right?

Does anyone know if the File Upload Utility is compatible with AWS Corretto OpenJDK (OpenJDK Download - Corretto - AWS)?

It is! I actually develop and test File Upload Utility against that version of OpenJDK.

2 Likes

Hi @anon50892160 - Good question. File Upload Utility itself doesn’t process the file or check for encodings, it just transports it to the cloud via API. I am not sure what all the API validates, before it is handed to the delimited file connector for parsing. The delimited file connector defaults to UTF-8 encoding, but I think theres a setting which can override this. Just keep in mind the data that goes back to ISC’s data stores is in fact UTF-8; so if you read in a different encoding it will be ‘cast’ to our default (expected) encoding. If this isn’t re-encoded correctly this could look like spurious characters, which is why we recommend UTF-8 encoding as theres no room for error. Hope this helps!

Neils project is really good, and it is also cross platform(linux/windows/mac). But in navigate I heard from a few customers that would like similar functionality that you are asking about. Also, they were looking for a method could follow to easily migrate the IIQ beanshell delimited files to ISC. I was able to spend a week with a test tenant to create a project that I believe will provide most of this functionality. Sato, with a bit of scripting, this project has a feature that you might be able to use to do the processing you are needing.
GitHub - jhyderjhyder/IdentityNow_AutoLoader: IdentityNow ISC AutoLoader for Delimited Files. The project needs some testing with large files. But because you can write a PowerShell script to pre-process the file, then you can validate the format or even rewrite it. If you find defects or enhancements, you would like to see please let me know. Also, this project will run as a windows service, so I think it would be easier to support for many users. If it gets traction/demand in the community, then I will work with SailPoint to add it to the colab.

2 Likes

Any update for the error code 503? We have been getting it recently. Not sure what is the reason. Can someone share the details?

I love this idea. Great work @JedHyder!

1 Like

I encourage you to do this so you can earn some Ambassador points from your work!

Hi Neil,

I’m also getting error 500 with message “An internal fault occurred.” while using version 4.1.0. Did you manage to find a solution for Minh? I tried replicating the issue using Postman but the request was successful, so I’m not sure what the cause of the is.

Regards,
Bhekamandla

Hi,

If I recall, there was a small error in the input file. There was a double quote on one of the fields.

I use Visual Studio Code w/ lint extension to check the csv file to make sure it correct.

Was there any solution for this error?

Connection resets are usually a network device, proxy, or firewall disconnecting your attempted connection to the cloud. I would seek advice with your network administrators from where this is being run. Most organizations require proxy configuration (which file upload utility supports).

@neil_mcglennon

I am using 4.1.0 file upload utility and jdk 21 when i followed u r process i am getting the below error. Can u please let me know what might be the issue.

Checking credentials…
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:130)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:383)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:326)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1318)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1195)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1138)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:393)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:476)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:447)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:206)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1506)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1421)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:336)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:185)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
at okhttp3.RealCall.execute(RealCall.java:81)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:207)
at sailpoint.service.SailPointService.createSession(SailPointService.java:110)
at sailpoint.utils.FileUploadUtility.call(FileUploadUtility.java:245)
at sailpoint.utils.FileUploadUtility.main(FileUploadUtility.java:145)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:388)
at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:271)
at java.base/sun.security.validator.Validator.validate(Validator.java:256)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:230)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1302)
… 35 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:148)
at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:129)
at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:383)
… 40 more
Analyzing account file: Downloads\f16541b2dc9c4bc2b846ed70a00cc075-testFileUploadUtility.csv
Analyzing account file: f16541b2dc9c4bc2b846ed70a00cc075-testFileUploadUtility.csv
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:130)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:383)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:326)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1318)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1195)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1138)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:393)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:476)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:447)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:206)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1506)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1421)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:336)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:185)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
at okhttp3.RealCall.execute(RealCall.java:81)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:207)
at sailpoint.service.SailPointService.createSession(SailPointService.java:110)
at sailpoint.service.SailPointService.getAuthenticatedService(SailPointService.java:53)
at sailpoint.service.SailPointService.aggregateAccounts(SailPointService.java:144)
at sailpoint.utils.FileUploadUtility.processFile(FileUploadUtility.java:333)
at sailpoint.utils.FileUploadUtility.call(FileUploadUtility.java:273)
at sailpoint.utils.FileUploadUtility.main(FileUploadUtility.java:145)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:388)
at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:271)
at java.base/sun.security.validator.Validator.validate(Validator.java:256)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:230)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1302)
… 38 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:148)
at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:129)
at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:383)
… 43 more
File [f16541b2dc9c4bc2b846ed70a00cc075-testFileUploadUtility.csv]: Error: Cannot invoke “sailpoint.object.Session.getAccessToken()” because “this.session” is null
Complete.

Elapsed time: 0 seconds
Files processed: 1

Success: 0

Error: 1

Skipped: 0

@naluvala Welcome to Sailpoint developer community !!

I’ve debugged the issue on my end and did not encounter the problem. I suggest exploring this direction as well. While I’m not fully confident in the solution I’m proposing, I wanted to share my thought process for consideration.  ```
How to Fix It:  
=========
 Step 1: Export the Certificate
 ==================================
Use a browser or openssl to get the SSL certificate chain for the target host (example: https://<org>.identitynow.com).

echo | openssl s_client -showcerts -servername <org>.identitynow.com -connect <org>.identitynow.com:443

Copy the certificate block:

-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
Save it as identitynow.crt.


Step 2: Import the Certificate into Java Truststore:
================================================
Locate your Java truststore path (e.g., $JAVA_HOME/lib/security/cacerts)
Default password is usually: changeit


keytool -import -trustcacerts -keystore $JAVA_HOME/lib/security/cacerts \
  -storepass changeit -noprompt -alias identitynow \
  -file identitynow.crt
  
  Now re-run the IdentityNow File Upload Utility. It should trust the server's certificate and successfully authenticate.
1 Like

Hi Guys,

I have added the following features / changes in a new PR due to experience with client needs.

I think that this PR helps the stability of the utility and provides features that are more aligned to an enterprise application.

New Features:
Configuration File as Alternative to Command-Line Arguments:
Added support for configuration using a JSON file to reduce the complexity of the configuration and reduces command line arguments and supports additional features.

Individual Source Aggregation Configuration:
Previously, the following settings could only be set as globally for the application’s run (regardless of the files and sources being aggregated):

  • timeout
  • disableOptimization
  • extensions
  • simulate

As of now each of these options can be configured per-source, enabling a more granular configuration. This also includes On-the-fly Encryption of Credentials.

File Archival / File Journey - Built in:
In many cases, files are picked up from a directory and processed, and there is often a reliance of a separate or overarching script of some sort (bash/PowerShell for example) which either picks the file up for processing by this application, or moves the file to an archival directory.

This has been addressed with the structure object within the configuration that allows defining in, stage, archive and error directories.

Logging Support with Log4j 2:
I have replaced the basic logging functionality and implemented Apache Log4j 2, providing a robust and consistent mechanism for capturing and managing application logs. This enhancement enables fine-grained control over log levels, formatting, and output destinations, making it easier for developers and administrators to monitor and troubleshoot the utility in a variety of environments.

By adopting Log4j 2, the utility inherently supports streaming log data to Security Information and Event Management (SIEM) solutions such as Splunk, ELK Stack, or other centralized log aggregation platforms. This is particularly valuable for enterprise deployments, where maintaining visibility, ensuring compliance, and detecting anomalies in real time are critical requirements.

Key benefits of this implementation include:
Flexible Configuration: Customize log levels and appenders (e.g., console, rolling files) via simple configuration changes without modifying the application code.
Enterprise Integration: Seamlessly forward logs to SIEM systems to support centralized monitoring and alerting pipelines.
Enhanced Debugging and Auditing: Provides clear, structured logs to facilitate operational support and forensic analysis.

I have included documentation to configure Splunk, which I have tested.

Added Environment Variables for Proxy Username and Password:
As with the environment variables for Client ID and Secret, I have added functionality to specify the proxy username and password with the following environment variables:
SAIL_PROXY_USER
SAIL_PROXY_PASS

These can be used by either setting the value env for --proxyUser and or --proxyPassword on the command line or setting the respective values to env in the config file.