![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
layer-migrate
Advanced tools
A command line tool for exporting your chat data from Layer and importing it to Stream
Layer's API is shutting down October 30th leaving many customers in a difficult position. This guide shows you how to export your data from Layer and safely migrate to Stream.
This is a work in progress. The automatic import functionality on Stream's side is tested by many customers. What's not done yet is the scripts to easily export your data from Layer and the serverless endpoints to sync data via webhooks. This repo will be much easier to use in a couple of days.
Install the layer-migrate tool
yarn global add layer-migrate
A. You need to generate a key to sign your layer export with:
mkdir keys
openssl genrsa -out keys/layer-export.pem 2048 && openssl rsa -in keys/layer-export.pem -pubout -out keys/layer-export.pub
B. As a second step you'll want to lookup your application ID and the Server API token from your Layer Dashboard.
export LAYER_APP_ID=YOUR_APP_ID_HERE (looks like 1dab157e-4d19-11e6-bb33-493b0000asdfasba)
export LAYER_TOKEN=YOUR_TOKEN_HERE (2vsm4yLCG24Y44IfSK6w8nBIxAgrVcU20zuPJ3fO8eXXv5Ub)
You can find your application ID under the Keys
section of your Layer dashboard.
And you can find your Layer token under Server API
.
Note: You must create the server API token. It will not be automatically generated for you.
C. Register your new key
layer-migrate register-key
D. Start an export
layer-migrate export
A. Wait for the export to complete
layer-migrate status
Note that Layer will also send you an email when the download completes
B. Download the export
Once the export is completed the json will include a download_url. Go ahead and download it
wget -O download.tar.gz.enc download_url
C. Decrypt the export
https://docs.layer.com/reference/server_api/data.out#decrypting-export-archives
# path to the file you just downloaded
export ENCRYPTED_TARBALL=download.tar.gz.enc
# path for the unencrypted tar
export OUTPUT_TAR=export.tar.gz
# path to the private key
export PRIVATE_KEY_PATH=keys/layer-export-key.pem
# the encrypted_aes_key from the export json
export ENCRYPTED_AES_KEY=V5sWiwjTVEur3/YfHvAsqj2tIBAcw5Q0pVnwQT1A03SwrD5PpQKZv9IlN1wFncVmuk+UWM2ZEJXbDUJRrHZktFvG9TTDL4M39HoFDqQNUD2g6Sof6JMmTAmoohHrVBiKDMxHXftuN+K/xnk0XR6xytPGd44R9NLuOVnOSgYldqQzCGHXIutUSfrbji+SWL3bPOJ72PMWolxoB8kVnFzwaiKn8spMzetw5yOsilwcijQy8PqUsDMz6ExKYvTB7N1tKmUccfSQoLG4jRqTlrgVGWpwp/a/kRDN5gsbGasZqi3zRP0tzcSOpAPH2mjfAc6gbrCLkaWPdtzVw3LWDo6HOQ==
# the aes_iv key from the export json
export AES_IV=dcmxMx47CNS6R5d8VcMISA==
openssl enc -in $ENCRYPTED_TARBALL -out $OUTPUT_TAR -d -aes-256-cbc -K `echo $ENCRYPTED_AES_KEY | base64 --decode | openssl rsautl -decrypt -inkey $PRIVATE_KEY_PATH | hexdump -ve '1/1 "%.2x"'` -iv `echo $AES_IV | base64 --decode | hexdump -ve '1/1 "%.2x"'`
Simply email support@getstream.io with your data export. It typically takes us 1 business day to import the data. (if it's a small import it will take less time).
Depending on your security preferences you can either send us the decrypted file, or the encrypted version with the key to decode it.
You can start syncing writes from Stream to Layer via webhooks. This is especially useful if you have mobile clients where you can't immediately remove the Layer client. We're currently working on setting up a serverless example for this.
The stream support team will send you a fully functional react example for testing your imported data. You'll want to review these 4 tutorials to learn more about how Stream works:
React Chat Tutorial React Native Chat Tutorial iOS/Swift Chat Tutorial Chat API Tour
Implement the UI that you want for your chat, and flip the switch Customizing Stream's libraries is typically easier than starting from scratch.
FAQs
A command line tool for exporting your chat data from Layer and importing it to Stream
The npm package layer-migrate receives a total of 0 weekly downloads. As such, layer-migrate popularity was classified as not popular.
We found that layer-migrate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.