CSR CLIENT

Transferring software Requirements

HTTPS

TLS version supported HTTP2 Authentification Authorized cipher
TLS v1.2 & v1.3 No By certificate (EC)DHE-RSA-AES256-GCM-SHA>512:ECDHE-(ECDSA RSA)-CHACHA20-POLY1305:ECDHE-(ECDSA RSA)-AES128-GCM-SHA256:ECDHE-(ECDSA RSA)-AES256-SHA384:ECDHE-(ECDSA RSA)-AES128-SHA256

SFTP

Authentification SSH version authorized
By RSA key SSH-2

Declare a new HTTPS / SFTP client

To declare a new HTTPS / SFTP client you need to retain a valid (granted) user credential.

  • Download the CSR client tool made for braincube servers
OS platform Architecture links additional dependencies
linux x64 linux linux_dep (also needs exec rights)
windows x64 windows
macos x64 macos
rawJS script x64 rawjs
  • For the Linux platform change the execution rights by executing this command :
    $ chmod a+x braincube-csr-client-linux
  • For the Mac platform change the execution rights by executing this command :
    $ chmod a+x braincube-csr-client-macos
  • Open a terminal and start the binary with the onboard command by typing :
    $ ./braincube-csr-client-linux o // for linux
    $ ./braincube-csr-client-macos o // for mac
    c:\braincube-csr-client-win.exe o // for windows
  • You need to chose your entry point (braincubetransfer.mybraincube.com by default, can be different if you have your own infrastructure) and type enter
? Targeted domain (braincubetransfer.mybraincube.com) (braincubetransfer.mybraincube.com)
  • Chose the type of key you want to use with your tool, Braincube accept types proposed
? Select the type of key to generate, non RSA keys requires working openssl binaries to be installed (use arrow to select)
  • Type the name to use for certificate files that will be created (by default it is onboard) and hit enter. We recommend to use the name of the Braincube you want to send data to.
? Defines the name of all the generated files (public key will be <name>.pub) braincubeName
  • Choose if you want to test the connection after the csr, type Y or n and enter
? Check connection by sending .trash file (this will start the docker container) ? (Y/n)
  • Your default browser will open and ask you to connect using your braincube's credentials


You have 10 minutes to do this onboard. After this time the ongoing process expire and you have to start again.

During the onboard the terminal give you some additional informations.

Posting board request
Onboarding to braincubetransfer.mybraincube.com
please visit https://braincubetransfer.mybraincube.com/sso-server/vendors/braincube/onboard.jsp?code=TEMP1234567890abcd
poll result was 206. you have 536 s
  • After a successful onboard return back to the terminal and you can see all the steps and finally the connection test state.
Generating Key Pairusing curve name prime256v1 instead of secp256r1
read EC key
writing EC key

Generating Csr
Posting CSR
CSR posted
saving certificate
Check connection
Check connection on braincubetransfer.mybraincube.com for 123456-7178-4b27-a123-ef567db67
post file result was 200 
Connection SUCCESSFULL
Private key path is /Users/matthieuherwegh/Desktop/braincubeName.pk
Public key path is /Users/matthieuherwegh/Desktop/braincubeName.pub
CSR path is /Users/matthieuherwegh/Desktop/braincubeName.csr
Cert path is /Users/matthieuherwegh/Desktop/braincubeName.pem
Onboard file path is /Users/matthieuherwegh/Desktop/braincubeName.onboard
  • The CSR client tool create some files in the same repository where you start the tool.
file Description
braincubeName.onboard Onboard file containing resuls path, and used for check mode
braincubeName.pk Private key used for both SFTP and HTTPS
braincubeName.pem Certificate used for HTTPS (saved in PEM format)
braincubeName.csr Certificate Signing Request sent to Braincube and used to generate the certificate
braincubeName.pub Public key (pair of the Private Key). Not used

Check for an existing onboarded client

The CSR tool allows you to check the connection for an existing client.

  • First you should be in the same directory as the .onboard generated file. This file will be used by the tool to retrieve all the information it needs.
$ ls
braincube-csr-client-linux  <b>data</b>-repository-name  <b>data</b>-repository-name.csr  <b>data</b>-repository-name.onboard  <b>data</b>-repository-name.pem  <b>data</b>-repository-name.ppk  <b>data</b>-repository-name.pub
  • Then type the check command
./braincube-csr-client-linux c // <b>for</b> linux
./braincube-csr-client-macos c // <b>for</b> mac
c:\braincube-cr-client-win.exe c // <b>for</b> windows
  • You need to choose your entry point (braincubetransfer by default) and type enter
? SSO intance (Use arrow keys)
❯ braincubetransfer
  • All the .onboard files found should be listed, pick the right one using the arrow keys and type enter
? Onboard file (Use arrow keys)
❯ data-repository-name.onboard 
  • The check process will launch and display information, and should end with a SUCCESS. During the 60 seconds, the tool tries to send a file every 2 seconds, and stop on success.
...

Found onboard info { productId: '61b563d3-7178-4b27-a771-ef88e17c874a',
  user: 'xxx@brainteam.mybraincube.com',
  step: 'BOARD_DETAILS_AVAILABLE',
  owner: 'xxxxxxxx',
  productName: 'brainteam',
  privateKey: '/home/downloads/data-repository-name',
  publicKey: '/home/downloads/data-repository-name.pub',
  csr: '/home/downloads/data-repository-name.csr',
  cert: '/home/downloads/data-repository-name.pem',
  onboard: '/home/downloads/data-repository-name.onboard' }
Checking Tampix 61b563d3-7178-4b27-a771-ef88e17c874a
Check connection on braincubetransfer.mybraincube.com <b>for</b> 61b563d3-7178-4b27-a771-ef88e17c874a
post file result was 200 
Connection SUCCESSFULL

After 60 seconds, if the check is not successfull, the tool ends with an error.


Error: Status code 200 not found <b>in</b> 60000 ms

Configure your SFTP client

Now that you have your key generated, you can set up your sftp client.

  • You will need the productId of the tampix (61b563d3-7178-4b27-a771-ef88e17c874a in this example) :
    • It's displayed by the Csr client tool
    • Or it's contained into the .onboard file
    • Or you can ask for it by reaching out to braincube support
  • To configure your sftp client, use the following information
    • Host : braincubetransfer.mybraincube.com
    • Port : 2222
    • Identification type : Private key / Key file
    • Identifier : your productId (61b563d3-7178-4b27-a771-ef88e17c874a in this example)
    • Key file : the private key file is generated by the tool (Private key path is /home/downloads/clientName in this example). (In some cases, key files need to have the .ppk extension).
  • Then save your configuration and use it to connect through sftp.
  • You may have to accept the server fingerprint for the first time. And you can also check the 'Always trust this host'.

  • Once connected you're automatically moved into the upload folder, and all the uploads must be done in the upload folder, otherwise, the file transfer will fail.

Configure your HTTPS client

HTTPS connection is similar to SFTP, unless :

  • The upload path is different and is https://braincubetransfer.mybraincube.com/upload/<productId> (https://braincubetransfer.mybraincube.com/upload/61b563d3-7178-4b27-a771-ef88e17c874a).
  • The upload MUST BE done using POST method.
  • You MUST use the certificate (.pem) AND the private key file to be able to connect.
  • The request MUST contain the File-Name HTTP header with the file name as value.
  • WARNING : For HTTPS you must be aware that the certificate is valid for 1000days.

Examples

Using curl :


curl 
    -X POST  # set POST method
    --cert ./clientName.pem  # path to certificate
    --key ./clientName.key  # path to private key
    -T <path_to_file> 
    -H "File-Name: <filename>"       
    https://braincubetransfer.mybraincube.com/upload/61b563d3-7178-4b27-a771-ef88e17c874a

Was this article helpful?

Powered by Zendesk