Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
A Definitive Guide to Apache ShardingSphere

You're reading from   A Definitive Guide to Apache ShardingSphere Transform any DBMS into a distributed database with sharding, scaling, encryption features, and more

Arrow left icon
Product type Paperback
Published in Jul 2022
Publisher Packt
ISBN-13 9781803239422
Length 466 pages
Edition 1st Edition
Concepts
Arrow right icon
Authors (3):
Arrow left icon
Trista Pan Trista Pan
Author Profile Icon Trista Pan
Trista Pan
Zhang Liang Zhang Liang
Author Profile Icon Zhang Liang
Zhang Liang
Yacine Si Tayeb Yacine Si Tayeb
Author Profile Icon Yacine Si Tayeb
Yacine Si Tayeb
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Introducing Apache ShardingSphere
2. Chapter 1: The Evolution of DBMSs, DBAs, and the Role of Apache ShardingSphere FREE CHAPTER 3. Chapter 2: Architectural Overview of Apache ShardingSphere 4. Section 2: Apache ShardingSphere Architecture, Installation, and Configuration
5. Chapter 3: Key Features and Use Cases – Your Distributed Database Essentials 6. Chapter 4: Key Features and Use Cases – Focusing on Performance and Security 7. Chapter 5: Exploring ShardingSphere Adaptors 8. Chapter 6: ShardingSphere-Proxy Installation and Startup 9. Chapter 7: ShardingSphere-JDBC Installation and Start-Up 10. Section 3: Apache ShardingSphere Real-World Examples, Performance, and Scenario Tests
11. Chapter 8: Apache ShardingSphere Advanced Usage – Database Plus and Plugin Platform 12. Chapter 9: Baseline and Performance Test System Introduction 13. Chapter 10: Testing Frequently Encountered Application Scenarios 14. Chapter 11: Exploring the Best Use Cases for ShardingSphere 15. Chapter 12: Applying Theory to Practical Real-World Examples 16. Other Books You May Enjoy Appendix: and the Evolution of the Apache ShardingSphere Open Source Community

Configuration – encryption

Data encryption can transform data based on encryption rules and encryption algorithms to protect private user data, while data decryption reverses the data encryption process.

In this section, we will present DistSQL statements and examples concerning data encryption alongside the YAML configurations and examples.

DistSQL

Now, let's look at the DistSQL statements:

  • Create Encrypt Rules:
    CREATE ENCRYPT RULE tableName(
    COLUMNS(
    (NAME=columnName ,PLAIN=plainColumnName,CIPHER=cipherColumnName,
    TYPE(NAME=encryptAlgorithmType ,PROPERTIES('key'='value')))
    ),QUERY_WITH_CIPHER_COLUMN=true);

To modify the syntax of the encrypt rule, replace CREATE with ALTER and keep the other parts unchanged. Here's an example:

CREATE ENCRYPT RULE t_encrypt (
COLUMNS(
(NAME=user_name,PLAIN=user_name_plain,CIPHER=user_name_cipher,TYPE(NAME=AES,PROPERTIES ('aes-key-value'='123456abc'))),
(NAME=password...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image