Key rotation on publish-subscribe systems
By introducing a topic aliasing mechanism and an encryption module into the publish-subscribe system, the service interruption problem during key rotation is solved, enabling an uninterrupted key rotation process and ensuring the system's time continuity and normal data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2026-03-31
AI Technical Summary
Existing publish-subscribe systems struggle to maintain uninterrupted service continuity during key rotation, causing the system to malfunction during re-encryption.
By introducing a topic alias mechanism, a re-encrypted copy of the topic log is created in the background, and the old topic log is securely deleted after re-encryption is completed. At the same time, the encryption module is used to implement key rotation in the proxy or intermediary to ensure that the client connection is not interrupted.
It achieves uninterrupted service continuity during key rotation, ensuring that clients of the publish-subscribe system can still write and read encrypted data streams normally when keys are updated, thus maintaining the system's time continuity.
Smart Images

Figure CN116615891B_ABST
Abstract
Description
Background Technology
[0001] This disclosure relates to the field of publish-subscribe systems, and more specifically to methods, computer program products, and computer systems for cryptographic key rotation in publish-subscribe systems.
[0002] Distributed data streaming systems, such as publish-subscribe systems, are playing an increasingly important role in data distribution within enterprises and other types of organizations. Publish-subscribe systems allow messages provided by publishers to be broadcast asynchronously to different parts of the system, i.e., subscribers. Messages published to a topic are broadcast to the subscribers of the corresponding topic. To protect messages stored in a publish-subscribe system, the stored messages can be encrypted. Summary of the Invention
[0003] According to embodiments of this disclosure, a method for cryptographic key rotation in a publish-subscribe system is provided. The publish-subscribe system stores multiple messages, each of which is assigned to a topic from a topic group, and each message is assigned a cryptographic key from the group (one or more) and encrypted using the assigned cryptographic key. The publish-subscribe system provides a broker service for routing stored messages to one or more subscribers of the topic to which the routed message is assigned. Routing includes decrypting the message to be routed using the assigned cryptographic key for the corresponding message and sending the decrypted message to the one or more subscribers of the assigned topic.
[0004] The cryptographic key rotation involves re-encrypting each message in a first set of one or more first messages from the stored messages. Each first message is assigned a common first topic from a topic group, a first cryptographic key from a first set of one or more first cryptographic keys in the group, and is encrypted using the assigned first cryptographic key. The re-encryption is performed as a background process by the encryption module of the publish-subscribe system, while the routing of first messages from the intermediary service continues and the reception of additional first messages for the common first topic by the intermediary service.
[0005] Re-encryption includes adding a second set of one or more second cryptographic keys to the group of cryptographic keys. Each of the second cryptographic keys is a replacement key for one of the first cryptographic keys. The method also includes, for each of the first messages, decrypting the encrypted first message using the first cryptographic key assigned to the corresponding first message. The decrypted first message is then re-encrypted using the replacement key of the assigned first cryptographic key. The replacement key used to re-encrypt the re-encrypted first message is assigned to the corresponding re-encrypted first message. A switch is performed from routing using the encrypted first message and the assigned first cryptographic key to routing using the re-encrypted first message and the assigned replacement key.
[0006] According to another embodiment of this disclosure, a computer program product for cryptographic key rotation in a publish-subscribe system is provided. The computer program product includes a computer-readable storage medium having program instructions embodied therein. The program instructions are executable by a processor of the computer system of the publish-subscribe system to cause the computer system to perform cryptographic key rotation.
[0007] A publish-subscribe system stores multiple messages. Each stored message is assigned to a topic from a topic group, and each message is assigned one or more cryptographic keys from the group and encrypted using those keys. The publish-subscribe system provides a mediator service for routing stored messages to one or more subscribers of the topic to which the routed message is assigned. Routing involves decrypting the message to be routed using the assigned cryptographic key for the corresponding message and sending the decrypted message to the one or more subscribers of the assigned topic.
[0008] The cryptographic key rotation involves re-encrypting each message in a first set of one or more first messages from the stored messages. Each first message is assigned a common first topic from a topic group, a first cryptographic key from a first set of one or more first cryptographic keys in the group, and is encrypted using the assigned first cryptographic key. The re-encryption is performed as a background process by the encryption module of the publish-subscribe system, while first messages continue to be routed from the intermediary service and additional first messages for the common first topic are received by the intermediary service.
[0009] Re-encryption includes adding a second set of one or more second cryptographic keys to the group of cryptographic keys. Each of the second cryptographic keys is a replacement key for one of the first cryptographic keys. The method also includes, for each of the first messages, decrypting the encrypted first message using the first cryptographic key assigned to the corresponding first message. The decrypted first message is then re-encrypted using the replacement key of the assigned first cryptographic key. The replacement key used to re-encrypt the re-encrypted first message is assigned to the corresponding re-encrypted first message. A switch is performed from routing using the encrypted first message and the assigned first cryptographic key to routing using the re-encrypted first message and the assigned replacement key.
[0010] According to another embodiment of this disclosure, a computer system for cryptographic key rotation in a publish-subscribe system is provided. The publish-subscribe system stores multiple messages, each of which is assigned to a topic from a group of topics, and each of the stored messages is assigned a cryptographic key from the group with one or more cryptographic keys, and is encrypted using the assigned cryptographic key. The publish-subscribe system provides a mediation service for routing stored messages to one or more subscribers of the topic to which the routed message is assigned. Routing includes decrypting the message to be routed using the assigned cryptographic key for the corresponding message, and sending the decrypted message to one or more subscribers of the assigned topic.
[0011] The cryptographic key rotation involves re-encrypting each message in a first set of one or more first messages from the stored messages. Each first message is assigned a common first topic from a topic group, a first cryptographic key from a first set of one or more first cryptographic keys in the group, and is encrypted using the assigned first cryptographic key. The re-encryption is performed as a background process by the encryption module of the publish-subscribe system, while first messages continue to be routed from the intermediary service and additional first messages for the common first topic are received by the intermediary service.
[0012] The computer system includes a processor and memory storing program instructions executable by the processor. The processor executes the program instructions to cause the computer system to perform re-encryption. Re-encryption includes adding a second set of one or more second cryptographic keys to the set of cryptographic keys. Each of the second cryptographic keys is a replacement key for one of the first cryptographic keys. The method also includes, for each of the first messages, decrypting the encrypted first message using the first cryptographic key assigned to the corresponding first message. Re-encrypting the decrypted first message using the replacement key of the assigned first cryptographic key. The replacement key for re-encrypting the re-encrypted first message is assigned to the corresponding re-encrypted first message. A switch is performed from routing using the encrypted first message and the assigned first cryptographic key to routing using the re-encrypted first message and the assigned replacement key. Attached Figure Description
[0013] The embodiments of this disclosure will now be explained in more detail by way of example and with reference to the accompanying drawings, wherein:
[0014] Figure 1 A schematic diagram illustrating an exemplary computer system is depicted;
[0015] Figure 2 A schematic diagram illustrating an exemplary publish-subscribe system is depicted;
[0016] Figure 3 A schematic diagram illustrating an exemplary publish-subscribe system is depicted;
[0017] Figure 4 A schematic diagram illustrating an exemplary publish-subscribe system with topic encryption implemented in a mediator is depicted;
[0018] Figure 5 A schematic diagram illustrating an exemplary publish-subscribe system with topic encryption implemented in a proxy is depicted.
[0019] Figure 6 A schematic flowchart depicts an exemplary method for cryptographic key rotation;
[0020] Figure 7 A schematic diagram of an exemplary publish-subscribe system with topic aliases implemented in a mediator is depicted.
[0021] Figure 8 A schematic diagram of an exemplary publish-subscribe system with topic aliases implemented in a mediator is depicted.
[0022] Figure 9 A schematic diagram of an exemplary publish-subscribe system with topic aliases implemented in a mediator is depicted.
[0023] Figure 10 A schematic diagram of an exemplary publish-subscribe system with topic aliases implemented in a mediator is depicted.
[0024] Figure 11 A schematic diagram of an exemplary publish-subscribe system with topic aliases implemented in a proxy is depicted;
[0025] Figure 12 A schematic diagram of an exemplary publish-subscribe system with topic aliases implemented in a proxy is depicted;
[0026] Figure 13 A schematic diagram of an exemplary publish-subscribe system with topic aliases implemented in a proxy is depicted;
[0027] Figure 14 A schematic flowchart depicts an exemplary method for cryptographic key rotation;
[0028] Figure 15 A schematic diagram illustrating the implementation of re-encryption using an intermediary re-encryption service is provided.
[0029] Figure 16 A schematic flowchart depicts an exemplary method for cryptographic key rotation;
[0030] Figure 17 A schematic diagram depicting a cloud computing environment is provided; and
[0031] Figure 18 A block diagram illustrating a set of functional abstraction model layers provided by a cloud computing environment is shown. Detailed Implementation
[0032] Various embodiments of this disclosure have been described for illustrative purposes, but are not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein has been chosen to best explain the principles of the embodiments, their practical application, or improvements to existing technologies in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
[0033] Messages stored in a publish-subscribe system can be ordered messages, such as time-ordered messages. The switch from routing using an encrypted first message and an assigned first cryptographic key to routing using a re-encrypted first message and an assigned replacement key can be performed automatically, ensuring uninterrupted service to the intermediary and / or client and eliminating the need for reconfiguration of the intermediary and / or client.
[0034] The implementation can ensure the temporal continuity of encrypted data streams provided by a publish-subscribe system during key rotation. It allows data providers / consumers, i.e., publishers / subscribers, to write to / read from the encrypted data stream without interruption during key rotation, i.e., while the encryption / decryption keys are being updated. Therefore, in a distributed data stream system in the form of a publish-subscribe system, key rotation can be implemented without interrupting service.
[0035] A publish-subscribe system is a system that implements the publish-subscribe messaging pattern, in which message senders (called publishers or producers) do not directly send messages to any receivers (called subscribers or consumers), but instead categorize the messages to be published into classes (called topics). Subscribers subscribe to one or more topics and only receive messages from the topics they have subscribed to. Therefore, publishers may, for example, not know which subscribers might exist (if any), while subscribers may, for example, not know which publishers might exist (if any). Both publishers and subscribers can only refer to topics when sending a request to the publish-subscribe system. The publish-subscribe messaging pattern can have the beneficial effect of enabling network scalability and dynamic network topologies.
[0036] In a publish-subscribe system, subscribers can receive only a subset of the total number of published messages. The process of selecting published messages for reception and processing is called filtering. Filtering can be, for example, topic-based. In a topic-based publish-subscribe system, messages are published to topics. Subscribers in a topic-based system can receive all messages published to the topics they subscribe to. For example, the publisher can be responsible for defining the topics that subscribers can subscribe to.
[0037] In a publish-subscribe system, publishers can, for example, post messages to an intermediary message broker, while subscribers register their subscriptions with the broker, allowing the broker to perform filtering. The broker can perform store-and-forward functions to route messages received from publishers to subscribers. Furthermore, the broker can, for example, prioritize messages in a queue before routing. Subscribers can register for specific messages, for example, at build time, initialization time, or runtime. For example, in a GUI system, subscribers can be coded to handle user commands, such as clicking a button, which could correspond to build-time registration. For example, XML configuration files can be used to register subscribers. These configuration files can be read at initialization time. For example, subscribers can be added or removed at runtime. This runtime registration can be used, for example, for database triggers, mailing lists, or RSS (“Truly Simple Aggregators” or “Rich Site Summary”).
[0038] One advantage of publish-subscribe systems is the loose coupling between publishers and subscribers. Publishers may not even need to know about the existence of subscribers. For example, focusing on a topic allows publishers and subscribers to remain unaware of the system topology. Publishers and subscribers can operate independently of each other. Publish-subscribe systems not only decouple publishers and subscribers geographically, but also temporally. A subscriber can subscribe to a topic for the first time and receive messages from topics that have been published previously.
[0039] Another advantage of publish-subscribe systems is their scalability. Scalability can be improved, for example, through parallel operations, message caching, tree-based or network-based routing. Publish-subscribe systems can provide Internet-wide distributed messaging, for example, through web aggregation protocols.
[0040] Server nodes, often called message brokers, act as intermediaries, writing received data to storage and forwarding it to clients upon request. As is common in publish-subscribe systems, data is organized into categories called topics. Message brokers support a so-called streaming paradigm, where data arrives at any time on any topic, and the data stream is continuous over a bounded or unbounded duration. Clients of the broker subscribe to one or more topics and receive data as a stream.
[0041] A topic's data can be stored across one or more topic partitions distributed across a mediator cluster. Each topic partition can be an ordered sequence of messages. The total amount of data in a topic is the union of these partitions. Publish-subscribe systems can support strict ordering within partitions, rather than between partitions. Partitions can be replicated to support fault tolerance. Publisher-subscribe systems can maintain the following information about a topic: the set of active partitions of the topic and the bootstrapping mediator that processes them, i.e., the leader; the offsets within the partitions for the oldest and newest messages; the last read offset for each partition for each consumer group; and the mediator that processes replicas of the partitions.
[0042] Consumers can connect to a bootstrap intermediary to obtain the location of the partition of the topic they wish to consume from, as well as the offset of the last message read from that partition by their consumer group. It then requests the next offset from each of these partitions. If the intermediary becomes unavailable, they can organize themselves to appoint a leader for all partitions that have become unavailable. Followers elected to become leaders must have a synchronized copy (ISR) of that partition. Followers obtain messages from the leader by consuming from it like normal consumers.
[0043] Clients can then switch their connections to these new leaders. Producers do something similar but don't need to worry about the latest offset. In short, publish-subscribe systems can be designed to scale to very high loads via the concept of distributed partitioning and to seamlessly handle failures via the concept of replicated partitioning.
[0044] Regulatory and security best practices may require key rotation, which typically necessitates periodically re-encrypting data with a new key as a risk mitigation measure or in response to the exposure of an active encryption key. Key rotation poses challenges to publish-subscribe messaging systems due to its continuous “live” nature. Rotating keys, in principle, requires the system to be suspended during re-encryption and only resumed once the re-encryption process is complete. However, messaging systems must be continuously available to receive and supply data without interruption. This disclosure describes different approaches by which messaging systems can be enabled to rotate keys without disrupting their service.
[0045] According to an embodiment, a publish-subscribe system may include a message broker that stores topic messages in encrypted form. This can be achieved by encrypting the input data (i.e., the message) and decrypting the same data in response to a client request.
[0046] Message encryption and decryption can be performed by the encryption module of an intermediary or the agent of a publish-subscribe system. The encryption module has access to the topic encryption key and can be configured to send and / or receive notifications about key rotation events.
[0047] For example, key rotation with re-encryption can be enabled in a publish-subscribe system using topic aliases. The topic alias directs requests to and from another topic. From the client's perspective, the topic alias appears and behaves like a normal topic. The key rotation process can leverage the alias to create a new, re-encrypted copy of the topic log of the topic to which the topic alias will currently direct requests. A new, re-encrypted copy of the topic log is created in the background as the new topic. Once the re-encryption process is complete, the topic alias is redirected to the new, re-encrypted topic. Previous topic logs can be securely deleted or archived. For clients of the aliased topic, nothing changes: the topic name, i.e., the alias, remains the same, the connection remains intact, and the service continues without interruption. For example, key rotation with re-encryption can be implemented as an internal mediation service in a publish-subscribe system. The internal topic management service can, for example, be extended to include a new re-encryption service. This re-encryption service can gradually replace stored messages in the background with re-encrypted versions of the corresponding messages. For large topic logs, parallelization can be used to optimize the re-encryption process. In a publish-subscribe system, the leader intermediary can coordinate other intermediaries in the cluster to share re-encrypted workloads, thereby parallelizing computation.
[0048] According to an embodiment, the cryptographic key used to encrypt and decrypt messages within a publish-subscribe system can be a symmetric cryptographic key.
[0049] According to an embodiment, the encryption module is mediated by a publish-subscribe system. The embodiment may have the beneficial effect that re-encryption via key rotation can be performed by the mediated entity.
[0050] According to an embodiment, the encryption module is included by a proxy of the publish-subscribe system, through which the intermediary of the publish-subscribe system communicates with the clients of the publish-subscribe system. The embodiment may have the beneficial effect that re-encryption via key rotation can be performed by the proxy. Therefore, only the proxy may need to be adjusted to perform re-encryption, while the intermediary of the publish-subscribe system may not need to be adjusted to perform re-encryption.
[0051] Both message decryption and re-encryption require a means of knowing which key encrypted a given message. This can be done by mapping message IDs to keys or indexes of key IDs. An alternative strategy could involve storing the encryption key along with the encrypted message in encrypted form. The encryption key can be encrypted or "wrapped" using different keys in a technique called envelope encryption. During decryption, the encryption module can request the decryption key to be unwrapped and use the unwrapped encryption key to decrypt the message. Because the encryption key is always stored with the message, maintaining an index may not be necessary, greatly simplifying the implementation.
[0052] The implementation can use a Key Management Service (KMS) to support packing and unpacking operations. It is assumed that the KMS stores the packing key in a highly secure manner so that it never leaves the KMS. In a publish-subscribe setup, the encryption module can store the packing key in the message header when the message is encrypted, and remove the header during message decryption before responding to client requests.
[0053] According to an embodiment, each encrypted message stored in the publish-subscribe system has a header that identifies an assigned cryptographic key from a group of cryptographic keys. The embodiment may have the beneficial effect of the encrypted message itself identifying the cryptographic key to be used to decrypt the corresponding message.
[0054] According to an embodiment, the header identifying the assigned cryptographic key is removed during routing before the decrypted message to be routed is sent to the subscriber. This embodiment can have the beneficial effect of preventing information related to the encryption and / or decryption of messages stored in the publish-subscribe system from being shared with clients such as subscribers.
[0055] According to an embodiment, the header of each encrypted message includes an identified cryptographic key using an envelope encryption form employing an envelope encryption key. Decryption of each encrypted first message further includes decrypting the allocated first cryptographic key provided in the header of the corresponding first message using the envelope encryption key. Reencryption of each decrypted first message further includes encrypting an allocated replacement key used to reencrypt the corresponding reencrypted first message using the envelope encryption key, and replacing the encrypted first cryptographic key in the header of the corresponding reencrypted first message with the encrypted replacement key.
[0056] The embodiment may have the beneficial effect that the encrypted message itself can provide a cryptographic key for decrypting the corresponding message.
[0057] According to an embodiment, the publish-subscribe system includes an index that identifies an assigned cryptographic key in a cryptographic key set for each stored message. The embodiment may have the beneficial effect of the index identifying a cryptographic key for decrypting the corresponding message for each stored message. For example, the index may identify individual messages, or it may identify, for example, a topic segment file in which messages are stored. For example, the index may include identifiers of stored messages, each stored message being assigned an identifier for a cryptographic key to decrypt the corresponding message. For example, the index may include identifiers of stored messages, each stored message being assigned a cryptographic key to decrypt the corresponding message.
[0058] According to an embodiment, re-encryption further includes using an index to identify a first cryptographic key assigned to a corresponding first message for each of the first messages, and assigning a replacement key for the identified first cryptographic key to the re-encrypted first message in the index. For example, in addition to the original first message encrypted using the first cryptographic key, the index may also identify the re-encrypted first message encrypted using the replacement cryptographic key. In this case, in addition to the identifier of the original first message, the identifier of the re-encrypted first message may be added to the index, and the identifier of the re-encrypted first message may be assigned an identifier of the replacement key to be used to decrypt the re-encrypted first message. For example, a replacement key may be assigned to the identifier of the re-encrypted first message for decrypting the re-encrypted first message. For example, the original first message may be replaced by the re-encrypted first message in the index. In this case, the identifier of the original first message may be replaced by the identifier of the re-encrypted first message, and the identifier of the first cryptographic key may be replaced by the identifier of the replacement key used to decrypt the re-encrypted first message. For example, the first cryptographic key included in the index may be replaced by the replacement key to be used to decrypt the re-encrypted first message.
[0059] The following provides different techniques for re-encrypting subject data without interrupting the intermediary's services.
[0060] The first technology introduces the concept of topic aliases, which redirect requests to and from another topic. From the client's perspective, a topic alias appears as and behaves like a normal topic. The key rotation process utilizes the alias to create a new, re-encrypted copy of the topic logs in the background. Once this re-encryption process is complete, the topic alias is redirected to the new, re-encrypted topic. Previous topic logs can be securely deleted or archived. For the client on the topic, nothing changes; the topic name (i.e., the alias) remains the same, the connection remains intact, and service continues uninterrupted.
[0061] The implementation can have several beneficial effects: For the clients of the topic, i.e., producers and consumers, the topic can behave the same as a traditional topic. It can retain the tags that requests can be directed to. Clients may not need special knowledge of topic aliases or any type of modification. Clients may not notice the re-encryption process. Re-encrypted data can retain all metadata, such as timestamps, headers, etc. Uninterrupted publish-subscribe services can be provided to clients. The technology of including aliases implemented in the broker can achieve re-encryption without changing the intermediary.
[0062] According to an embodiment, each stored message is stored as a member of the topic to which the corresponding message is assigned. The method also includes providing a first topic alias pointing to a common first topic from a first set of messages. One or more subscribers to the common first topic subscribe to the first topic alias. An additional common second topic is added to the topic group, and the re-encrypted first message is stored as a member of the common second topic. The switching includes reassigning the first topic alias to the common second topic, such that one or more subscribers to the first topic alias become subscribers to the common second topic.
[0063] The embodiment may have topic aliases that can be used to achieve the beneficial effect of re-encryption. Switching from an encrypted first message to a re-encrypted first message can be achieved by reassigning topic aliases. As long as a topic alias is assigned to a common first topic, the encrypted first message is used to continuously provide mediation services. When a topic alias is reassigned to a common second topic, the mediation service continues using the encrypted first message.
[0064] According to an embodiment, the switching also includes deleting a common first topic containing the first encrypted message. This embodiment may have the beneficial effect of saving storage space. According to an alternative embodiment, the switching also includes archiving the common first topic along with the first encrypted message.
[0065] According to an embodiment, the switching also includes deleting the first cryptographic key. This embodiment may have the beneficial effect of saving storage space. According to an alternative embodiment, the switching also includes archiving the first cryptographic key.
[0066] According to an embodiment, each of the additional first messages for a topic alias received by the publish-subscribe system from the publisher is assigned to a common second topic, assigned one of the second cryptographic keys in a second set of second cryptographic keys, and encrypted using the assigned second cryptographic key.
[0067] The embodiment may have the beneficial effect of having an additional first message, particularly the first message received during re-encryption, which can be directly encrypted using the second cryptographic key and assigned to a common second topic.
[0068] Topic aliases can be used to implement key rotation. For clients of a publish-subscribe system, such topic aliases appear as normal topics, but are actually intermediaries between another topic and a different topic. Topic aliases can be managed through administrative actions. The minimum administrative actions to support the existence and management of topic aliases can include: creating an alias; assigning a created alias to a topic; detaching an alias from a topic; and deleting a detached alias.
[0069] An existing but unassigned topic alias can be treated as non-existent or inactive by the intermediary. This can be an implementation choice and affects the error message returned when a client attempts to address an unassigned alias. Configurable options allow the automatic revocation of a topic's visibility once an alias is assigned. This forces clients to exclusively access the underlying data via the topic alias.
[0070] Theme aliases can be consistently integrated with all facilities of the corresponding intermediary. For example, an intermediary for an integrated registry can support the registration and updating of aliases in the registry. Similarly, security policies can be applied to theme aliases in the same way as they are applied to normal themes.
[0071] A general workflow for rotating topic encryption keys using topic aliases may include: creating a topic and a topic alias; assigning the alias to the topic and configuring the topic alias for encryption. Clients can begin sending and receiving messages via the alias. Initiating key rotation includes: adding a new topic and creating a new cryptographic key for the new topic. The cryptographic key used by the topic encryption module can be updated with the new cryptographic key, causing new messages received by the publish-subscribe system to be encrypted with the new cryptographic key. A re-encryption process begins, copying data, i.e., messages, from the old topic to the newly created topic, and re-encrypting the copied data with the new cryptographic key. The re-encryption process may append new messages arriving during the re-encryption period to the new topic. The re-encryption process ends when all data included in the old topic has been copied to the new topic and re-encrypted, and the alias is reassigned to the new topic. Optionally, the previously active topic logs of the old topic can be deleted. The above workflow can be completed transactionally.
[0072] Topic aliases can be implemented, for example, in a proxy or directly in the intermediary of a publish-subscribe system. For instance, a publish-subscribe system can include a proxy. When the proxy is implemented in the publish-subscribe system, the client can communicate with the intermediary of the publish-subscribe system via the proxy, rather than directly with the intermediary. Similarly, the intermediary can communicate with the client via the proxy. A proxy can be used, for example, for tasks such as introducing a specific access control model into a publish-subscribe system.
[0073] The broker's functionality can be extended to support topic aliases. In this approach, one or more independent topics can be associated with the same alias group. The creation and management of this alias group are handled externally to the broker. Alias groups are specified in the same way as topics, such as the number of partitions, the number of replicas, etc. Topics can be added to or removed from alias groups, resulting in the creation of corresponding topics on the publish-subscribe system cluster using the alias group configuration. For example, all topics in the same group can have the same configuration. At any given time, zero or one topic is designated as the active topic.
[0074] Clients can communicate with topic aliases using the standard protocols of a publish-subscribe system, just as if they were normal topics. Specifically, the program instructions controlling the intermediaries in the publish-subscribe system do not need to be changed. Producers can use the standard protocols to send messages to topic aliases, and consumers can use the standard protocols to receive messages from them. However, there are no topic logs with aliases on the intermediaries or intermediary clusters of the publish-subscribe system. Instead, the broker can map the aliases provided by the topic aliases to the names of topics on the intermediaries or clusters of the publish-subscribe system. The corresponding topic associated with the topic alias can act as an actual active topic, making the topic alias behave as an active topic.
[0075] When an encryption module is integrated into a proxy, the proxy can encrypt messages sent to a topic alias and decrypt messages received from the topic alias. To achieve this, the proxy, or more precisely, the encryption module integrated into the proxy, can use the current cryptographic key. As mentioned earlier, the current cryptographic key used for encryption can be added to the message header of the encrypted message for storage and removed from the message header during decryption in response to client requests.
[0076] Alternatively, topic aliases can be implemented within the intermediary of the publish-subscribe system. Such an implementation might require modifying the program instructions that control the intermediary. If the intermediary's program instructions can be modified, topic aliases can be implemented within the intermediary without an additional proxy. This proxy-free implementation can have the beneficial effect of removing an additional architectural component from the system. However, proxies can still be used for other benefits, such as introducing specific access control models into the publish-subscribe system. The concepts of aliases and alias groups remain the same as described above, except that they are directly integrated into the intermediary along with the encryption module.
[0077] The second technique implements a new re-encryption service. This new re-encryption service can, for example, extend the intermediary's internal topic management service. Similar to a log cleaner in a publish-subscribe system, the re-encryption service can gradually replace stored messages with re-encrypted versions in the background. Optimizations are provided for very large topic logs, thereby enabling the lead intermediary to coordinate other intermediaries in the cluster to share the re-encryption workload, thus parallelizing computation. This second technique also operates without interrupting the intermediary service.
[0078] According to an embodiment, switching from an encrypted first message with an assigned first cryptographic key to a re-encrypted first message with an assigned replacement key involves replacing each of the encrypted first messages with the corresponding re-encrypted first message. The embodiment may utilize a re-encryption service mediated by, for example, a publish-subscribe system to achieve the beneficial effect of re-encryption.
[0079] According to an embodiment, the re-encryption of the first message and the replacement of the encrypted first message with the corresponding re-encrypted first message can be performed continuously. The encrypted first message can be stored, for example, in segmented files, which are continuously re-encrypted. For example, the continuous re-encryption can begin with the most recent segment, i.e., the youngest segment in time.
[0080] According to an embodiment, the encrypted first message is stored in a set of segmented files. One of the segmented files in this set is currently used to store the encrypted first message, while the remaining segmented files in the set that are already filled with the encrypted first message are closed. If an open segmented file is full, it is closed, and an additional segmented file is added to the set of segmented files; this additional segmented file is used to store the encrypted first message.
[0081] When re-encryption begins, the segment file currently used to store the encrypted first message is closed, and additional segment files are added to the segment file set to store additional encrypted first messages received by the publish-subscribe system from the publisher for the common first topic.
[0082] The re-encryption of the first encrypted message is performed segment by segment. Segment re-encryption involves selecting the remaining closed segment files one by one, generating a replacement segment file for each selected segment file that contains the encrypted first message of the selected segment file, and replacing the selected segment files with the replacement segment files.
[0083] The implementation can have the beneficial effect of continuously re-encrypting the first message in an orderly manner.
[0084] According to an embodiment, segment re-encryption begins with the most recent segment file in the set of segment files. The most recent, i.e., the youngest segment in time, may be the most recently closed segment file, which includes the most recently received messages. The offsets of these most recent messages have minimal difference from the offsets of messages that begin encryption using the second cryptographic key within the storage of the publish-subscribe system. The embodiment may also have the beneficial effect that the most recent message (i.e., the latest message) is the first message available in re-encrypted form. According to an embodiment, a segment file may be deleted, for example, when the maximum retention time of the messages included in the corresponding segment file expires. The embodiment may also have the beneficial effect that the oldest message can be re-encrypted last, preventing the publish-subscribe system from unnecessarily re-encrypting messages that may be deleted later during key rotation due to their maximum retention time expiring.
[0085] According to an embodiment, an offset value is determined, which identifies the offset of an appended first message. Using this appended first message, encryption using a second cryptographic key is initiated in the storage device of the publish-subscribe system. According to an embodiment, the determined offset value is stored. The embodiment may have the beneficial effect of enabling the publish-subscribe system (e.g., a publisher-subscriber's agent) to determine when re-encryption is complete.
[0086] According to an embodiment, each additional first message for a common first topic received by the publish-subscribe system from the publisher is assigned to the common first topic, assigned one of the second cryptographic keys in a second set of second cryptographic keys, and encrypted using the assigned second cryptographic key.
[0087] The embodiment can have the following beneficial effect: the additional first message, specifically the first message received during re-encryption, can be directly encrypted using the second cryptographic key and assigned to the common first topic.
[0088] According to an embodiment, the publish-subscribe system includes multiple additional intermediaries. The publish-subscribe system includes multiple additional copies of a segmented file set. Each of the additional copies is assigned to one of the additional intermediaries. Re-encryption of the segmented files is distributed among the intermediaries of the publish-subscribe system, achieving parallelization of re-encryption. The first re-encrypted message is distributed to the other copies of the segmented file set.
[0089] The implementation can have the beneficial effect of parallelizing the re-encryption process. This allows for more efficient re-encryption.
[0090] Key rotation with re-encryption can be implemented, for example, using an internal intermediary service. Therefore, instead of introducing topic aliases, topic management within the intermediary can be extended by additional features. Such an approach may require modification and / or extension of known protocols used to control intermediaries in publish-subscribe systems. Such embodiments can have beneficial effects, for example, being more efficient than introducing additional topic aliases and / or using additional proxies.
[0091] A publish-subscribe system can store data (such as messages) associated with a topic partition in a directory, which can be named after the topic partition. The directory's contents can include log segment files containing the actual messages, as well as some files containing metadata. Log segment files can have a fixed maximum size, such as 100MB. When a log segment is full, a new log segment file can be created, and messages can then be added to the newly created log segment file. The publish-subscribe system can run a background thread that, for example, deletes log segment files when the maximum retention time for messages expires. For compressed topics without a maximum retention time, a compression process can be used to compress these topics. For example, in a topic, only the last valid value of a given key is available, and keys mapped to null values can be removed.
[0092] Similar to so-called log cleaner services, and compression and expiration services as mentioned above, a re-encryption process can be added as an encryption service to the publisher-subscriber system as an intermediary. This process re-encrypts segmented file data using a new encryption key as a replacement for the current one. Once the re-encryption process begins, all new messages can be encrypted using the new encryption key. The intermediary can store offset values indicating the offsets of stored messages, at which the intermediary begins encrypting new messages using the new encryption key. Actual re-encryption of older messages already stored in the publisher-subscriber system and encrypted with the old encryption key can be initiated. The intermediary can start re-encrypting all older messages from the determined offset and continue until the oldest message arrives and is re-encrypted. Once the last older message has been re-encrypted, the re-encryption process is complete, and the old key can be discarded.
[0093] For example, assuming a maximum log segment size of 100MB, there would be 10,000 log segment files of that size for a 1TB topic partition. Re-encryption could include decrypting and encrypting all these segment files. According to one embodiment, re-encryption could be performed by a single intermediary, such as a leader intermediary, which independently and re-encrypts the log segment files distributed to followers. According to another embodiment, re-encryption could be performed by multiple intermediaries in a publish-subscribe system, which parallelize the re-encryption process. For example, the internal protocol controlling the intermediaries in the publish-subscribe system could be modified so that all intermediaries with copies of the partition can coordinate among themselves, such that each of them re-encrypts a subset of the log segment files included in the copy, and then exchanges the re-encrypted segment files with all other intermediaries with copies of the same partition.
[0094] The implementation can have the following beneficial effects: due to the re-encryption and parallelization, only the intermediary-to-intermediary interaction can be changed, while the clients of the publish-subscribe system can remain unaware that an intermediary is doing this. Therefore, such parallelization can be suitable as an optimization in publish-subscribe systems, including those provided by managed servers.
[0095] Exemplary algorithms for re-encrypting a topic using a segmented file include the following:
[0096]
[0097] For example, a computer program product may also include program instructions executable by a processor of a computer system in a publish-subscribe system, configured to implement any embodiment of the method for cryptographic key rotation in a publish-subscribe system described herein.
[0098] For example, the computer system is also configured to perform any embodiment of the method described herein for cryptographic key rotation in a publish-subscribe system.
[0099] Figure 1 An exemplary computer system 100 configured for cryptographic key rotation in a publish-subscribe system is illustrated. The exemplary computer system 100 may, for example, be an intermediary or agent in a publish-subscribe system. It will be understood that the computer system 100 described herein can be any type of computerized system including multiple processor chips, multiple memory buffer chips, and memory. The computer system 100 may, for example, be implemented in the form of a general-purpose digital computer, such as a personal computer, workstation, or microcomputer. The computer system 100 may, for example, be implemented in the form of a server.
[0100] In an exemplary embodiment, in terms of hardware architecture, such as Figure 1 As shown, computer system 100 includes a processor 105, a memory (main memory) 110 coupled to a memory controller 115, and one or more input and / or output (I / O) devices (or peripheral devices) 140, 145 (shown as peripheral storage media) communicatively coupled via a local input / output controller 135. The input / output controller 135 may be, but is not limited to, one or more buses or other wired or wireless connections, as known in the art. The input / output controller 135 may have additional elements, which are omitted for simplicity, such as controllers, buffers (caches), drivers, repeaters, and receivers, to enable communication. Furthermore, the local interface may include address, control, and / or data connections to enable proper communication between the aforementioned components.
[0101] Processor 105 is a hardware device for executing software, specifically software stored in memory 110. Processor 105 can be any custom or commercially available processor, central processing unit (CPU), auxiliary processor among several processors associated with computer system 100, semiconductor-based microprocessor (in the form of a microchip or chipset), macroprocessor, or any device generally used for executing software instructions.
[0102] Memory 110 may include any one or a combination of volatile memory modules (e.g., random access memory (RAM, such as DRAM, SRAM, SDRAM, etc.)) and non-volatile memory modules (e.g., ROM, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or programmable read-only memory (PROM)). Note that memory 110 may have a distributed architecture, in which additional modules are geographically separated but can be accessed by processor 105.
[0103] The software in memory 110 may include one or more separate programs, each including an ordered list of executable instructions for implementing logical functions, particularly those involved in the embodiments of this disclosure. The executable instructions may also be configured for cryptographic key rotation in a publish-subscribe system. Specifically, the executable instructions may be configured to re-encrypt publish-subscribe system messages using an encryption module provided by computer system 100, for example, in the form of executable instructions. The software in memory 110 may also include a suitable operating system (OS) 111. OS 111 substantially controls the execution of other computer programs, such as possible software 112.
[0104] If the computer system 100 is a PC, workstation, intelligent device, etc., the software in the memory 110 may also include a Basic Input / Output System (BIOS) 122. The BIOS is a set of basic software routines that initialize and test the hardware at startup, boot the OS 111, and support data transfer between hardware devices. The BIOS is stored in ROM so that it can be executed when the computer system 100 is activated.
[0105] When computer system 100 is running, processor 105 is configured to execute software 112 stored in memory 110 to transfer data to and from memory 110, and generally to control the operation of computer system 100. The methods and OS 111 described herein, wholly or partially, but generally the latter, are read by processor 105, possibly buffered within processor 105, and then executed.
[0106] Software 112 may also be provided stored on any computer-readable medium, such as storage device 120, for use by or in connection with any computer-related system or method. Storage device 120 may include disk storage device 127, such as HDD storage device. Messages of the publish-subscribe system may be stored on computer system 100 using internal storage devices similar to storage device 120 or peripheral storage devices similar to storage medium 145. Alternatively or additionally, messages of the publish-subscribe system may be stored on other computer systems, such as computer system 170, for example, those accessible to computer system 100 via a network (such as network 160). Alternatively or additionally, cryptographic keys used for encrypting and decrypting messages of the publish-subscribe system may be stored on or accessible to computer system 100.
[0107] For example, a conventional keyboard 150 and mouse 155 may be coupled to an input / output controller 135. Other output devices such as I / O devices 10 may include input devices, such as, but not limited to, printers, scanners, microphones, etc. Finally, I / O devices 140, 145 may also include devices that communicate with both input and output, such as, but not limited to, network interface cards (NICs) or modulators / demodulators (for accessing other files, devices, systems, or networks), radio frequency (RF) or other transceivers, telephone interfaces, bridges, routers, etc. I / O devices 140, 145 may include any general-purpose encryption cards or smart cards known in the art. Computer system 100 may also include a display controller 125 coupled to a display 130. For example, computer system 100 may also include a network interface for coupling to a network 160, such as an intranet or the Internet. The network may be an IP-based network for communication between computer system 100 and any external server via a broadband connection, such as computer system 170, other clients, etc. Computer system 170 may be, for example, a publisher computer system, a subscriber computer system, a mediator server such as in a mediator cluster, or a proxy in a publish-subscribe system. Network 160 sends and receives data, such as messages, between computer system 100 and computer system 170. For example, network 160 may be a managed IP network managed by a service provider. Network 160 may be implemented wirelessly, for example, using wireless protocols and technologies such as Wi-Fi, WiMAX, etc. Network 160 may also be a packet-switched network, such as a local area network (LAN), wide area network (WAN), metropolitan area network (MAN), the Internet, or other similar network environments. The network may be a fixed wireless network, a wireless local area network (LAN), a wireless wide area network (WAN), a personal area network (PAN), a virtual private network (VPN), an intranet, or other suitable network system, and includes devices for receiving and transmitting signals.
[0108] Figure 2 An exemplary publish-subscribe system 200 is illustrated. The publish-subscribe system 200 includes one or more intermediaries 202 configured to receive messages 204 from one or more producers 206, i.e., publishers, of which messages 204 are received. Messages 204 are assigned to a topic 210. The intermediaries 202 store the recovered messages 204 in the message log of topic 210. Consumers 208, i.e., subscribers, can subscribe to one or more topics 210. Messages 204 stored in topics 210 are forwarded by the intermediaries 202 to consumers 208 subscribed to the corresponding topics 210.
[0109] The intermediary 202 included in the publish-subscribe system 200 can be configured as an encrypted intermediary including an encryption module. The encryption module can be implemented as an internal component of the encrypted intermediary 202, configured to handle cryptographic operations such as encrypting and decrypting messages. The encrypted intermediary 202 can encrypt a message 204 received from the producer 206, producing an encrypted message 205, which is stored in the message log of the topic 210 to which message 204 is assigned. The encrypted intermediary 202 can also decrypt the encrypted message 205 stored in the message log of topic 210 to return the original message 204, i.e., the unencrypted message, to the consumer 208 that has subscribed to the corresponding topic 210 provided by the publish-subscribe system 200.
[0110] Such a publish-subscribe system 200 uses a publish-subscribe architecture, also known as a publish-subscribe pattern. The intermediary 202 of the publish-subscribe system 200 can persistently store all messages 204 received as a log to a file system. Messages 204 are written to and read from categories, namely so-called topics 210. The publish-subscribe system 200 can provide a large-scale, scalable publish-subscribe message queue designed as a transaction log. For example, multiple intermediaries 202 can be provided to form a cluster, and the transaction log can be implemented as a distributed transaction log distributed across the cluster.
[0111] Figure 3 Another exemplary publish-subscribe system 200 is shown. Figure 3 The publish-subscribe system 200 corresponds to Figure 2 The publish-subscribe system 200 includes a publisher 206, but also a proxy 203. Clients of the publish-subscribe system 200, namely producers 206 and consumers 208, do not communicate directly with the intermediary 202 of the publish-subscribe system 200, but rather via the proxy 203. Similarly, the intermediary 202 can communicate with clients 206 and 208 via the proxy 203. The proxy 203 can, for example, be configured to implement access control measures into the publish-subscribe system 200.
[0112] Figure 4An exemplary encrypted message broker 202 is shown in more detail. The encrypted message broker 202 includes an encryption module 201. The encryption module 201 is configured to encrypt a message m received from a producer 206 using a cryptographic key k. Encrypting message m with cryptographic key k by the encryption module 201 produces ciphertext c = E(k,m), i.e., an encrypted message, which is stored in the message log of topic t 210. The encryption module 201 uses an encryption function E to generate the ciphertext c = E(k,m). The message log of topic 210 may include multiple encrypted messages 205 stored in a segment file 211. When the encrypted message 205 stored in the segment file 211 of topic t 211 should be forwarded to a consumer 208 subscribing to topic t 210, the encrypted message 205 is read from the storage device of the broker 202 and provided to the encryption module 201 in the form of ciphertext c. The encryption module 201 uses a decryption function D to recover the original unencrypted message m = D(k,c) from the ciphertext c using the cryptographic key k.
[0113] Examples can have the beneficial effect of improving security by enabling key rotation. Key rotation can be performed periodically, for example, as a measure of risk management. For example, security rules may require periodic key rotation. For example, key rotation may be performed in response to events that challenge the security of encryption keys in use. Key rotation involves changing the key and may require re-encrypting existing encrypted data with the new key.
[0114] Figure 5 Another exemplary publish-subscribe system 200 with message broker 202 and agent 203 is shown. Clients 206 and 208 of the publish-subscribe system 200 can communicate with broker 202 via agent 203. Similarly, broker 202 can communicate with clients 206 and 208 via agent 203. Figure 5 In this case, the encryption module 201 for encrypting and decrypting messages is included by the agent 203. Therefore, the agent 203 can be configured to encrypt and decrypt messages. The agent 203 can also be configured, for example, to implement access control measures into the publish-subscribe system 200. The agent can encrypt the input message m to obtain ciphertext c = E(k,m), which is forwarded to be stored in topic t 210 by the intermediary 202, and decrypt the ciphertext c to obtain the output message m = D(k,c), which is forwarded to the consumer 208 subscribing to topic t.
[0115] Similar to Figures 2 to 5The publish-subscribe system 200 shown can be continuously online, i.e., it can continuously receive and send messages. There is increasing reliance on such publish-subscribe systems 200 for storing and distributing data, for example, within an organization. In the following examples, it can be described in terms of key rotation that allows for the replacement of the cryptographic key k used by the publish-subscribe system 200 to encrypt the finally decrypted message using the replacement key. These examples can have the beneficial effect of enabling efficient and effective re-encryption of large amounts of data as large as the amount of data included by the publish-subscribe system 200. Examples can be implemented without taking the publish-subscribe system 200 offline to re-encrypt messages stored by the publish-subscribe system 200. Below, different methods are described for re-encrypting topic data, i.e., topic messages, stored in the intermediary 202 of the publish-subscribe system 200, without interrupting the publish-subscribe system 200.
[0116] One approach can be based on the creation of a topic alias that enables re-encryption without interrupting the publish-subscribe system 200. Another approach can be based on an extension of the intermediary 202 that provides a re-encryption service that enables re-encryption without interrupting the publish-subscribe system 200. Both approaches can have the beneficial effect of allowing the intermediary 202 to continue operating uninterrupted. Clients 206 and 208 of the intermediary 202 can therefore remain unaware of the re-encryption at the intermediary 202. Alternatively, a proxy 203 can be used for re-encryption. These methods can also have the beneficial effect of preserving message metadata through the re-encryption process.
[0117] Figure 6 A schematic flowchart illustrating an exemplary method for cryptographic key rotation in a publish-subscribe system, such as... Figure 4 or Figure 5 The publish-subscribe system 200. The publish-subscribe system stores multiple messages. Each stored message is assigned to a topic in a group from one or more topics. Each stored message is assigned a cryptographic key from a group of one or more cryptographic keys and is encrypted using the assigned cryptographic key. The publish-subscribe system provides a mediation service for routing stored messages to one or more subscribers of the topic to which the routed message is assigned. Routing involves decrypting the message to be routed using the assigned cryptographic key for the corresponding message and sending the decrypted message to one or more subscribers of the assigned topic.
[0118] The cryptographic key rotation involves re-encrypting each message in a first set of one or more first messages in the stored messages. Each first message is assigned a common first topic from a topic group, a first cryptographic key from a first set of one or more first cryptographic keys in a cryptographic key group, and is encrypted using the assigned first cryptographic key. The re-encryption is performed as a background process by the encryption module of the publish-subscribe system, while the routing of first messages from the intermediary service continues and the reception of additional first messages for the common first topic by the intermediary service.
[0119] In box 300, one or more second cryptographic keys are added as replacement keys for one or more first cryptographic keys used to encrypt first messages on the first topic. For example, a single first cryptographic key can be assigned to the first topic, and that single first cryptographic key can be used to encrypt all messages assigned to the first copy. In this case, a single second cryptographic key can be added to the first topic to replace the previously used first cryptographic key. Alternatively, multiple first cryptographic keys can be assigned to the first topic, and different first cryptographic keys can be used to encrypt different messages assigned to the first copy. In this case, multiple second cryptographic keys can be added to the first topic, including replacement keys for each of the previously used first cryptographic keys.
[0120] In box 302, each of the first messages assigned to the first topic can be decrypted using the first cryptographic key assigned to the corresponding first message. In box 304, each decrypted first message can be re-encrypted using one of the replacement keys added in box 300. For example, a replacement key can be assigned to a previously used first cryptographic key as a replacement key. In box 306, a replacement key for re-encrypting the re-encrypted first message can be assigned to the corresponding re-encrypted first message. In box 308, the publish-subscribe system switches from routing using the encrypted first message and the assigned first cryptographic key to routing using the re-encrypted first message and the assigned replacement key. Furthermore, previously used encrypted first messages and / or previously used first cryptographic keys can be deleted.
[0121] Figure 7An exemplary publish-subscribe system 200 is illustrated, which uses a topic alias ta 212 to implement cryptographic key rotation. For clients 206 and 208 of the publish-subscribe system 200, the topic alias ta 212 appears as a normal topic, but is actually a man-in-the-middle for another topic t1 210. Messages assigned to the topic alias ta 212 can be received from producer 206. The topic alias ta 212 can point to topic t1 210, such that received messages are further assigned to topic t1 210 and stored in segment file 211 of the message log of topic t1 210. For this purpose, the received message m can be encrypted using a cryptographic key k1 (e.g., the cryptographic key k1 assigned to topic t1 210), generating ciphertext c1 = E(k1, m). This ciphertext c1 can be stored as an encrypted message 205 in the message log of topic t1 210. Consumer 208 can subscribe to topic alias ta 212, causing encrypted message 205 stored in the message log of topic t1 210 to be forwarded to consumer 208. To do this, the encrypted message 205 to be forwarded can be read from the message log of topic t1 210 in ciphertext c1, and decrypted using the cryptographic key k1 to recover the original unencrypted message m = D(k1, c1). The original unencrypted message m can then be sent to consumer 208 by intermediary 202. For encryption and decryption, intermediary 202 can use methods such as... Figure 4 The encryption module shown.
[0122] Subject aliases, such as subject alias ta 212, can be used in intermediary 202 or in, for example, Figure 11 Implemented in the attached agent shown. Topic aliases, such as topic alias ta 212, can be integrated with all facilities of intermediary 202, such as policies, registry, etc. Such topic aliases can be created and / or deleted by the administrator of intermediary 202 or the agent. Furthermore, administrator actions can include attaching a topic alias such as topic alias ta 212 to and / or detaching it from a specific topic such as topic t1 210. A topic alias attached (i.e., assigned) to a specific topic is an intermediate pointer to the corresponding specific topic. When a topic alias is attached to a specific topic, the corresponding specific topic can optionally be hidden from the clients of publish-subscribe system 200. Therefore, clients like producer 206 and consumer 208 can communicate only with logical, aliased topics, i.e., topic aliases such as topic alias ta 212.
[0123] For example, a publish-subscribe system may include only topic aliases assigned to topics. Alternatively, a publish-subscribe system may also include one or more unassigned topic aliases that are not assigned to any topics. These unassigned topic aliases are visible to clients, but return an error when used to send or receive messages. Alternatively, unassigned topic aliases may be hidden from clients (206, 208) until they are assigned to a topic.
[0124] The re-encryption of the encrypted message 205 stored in the message log of topic t1 210 can be performed by the intermediary 202 using a re-encryption process 214 executed in the background (e.g., as a background thread). The re-encryption process 214 can be performed, for example, by the encryption module of the intermediary 202.
[0125] Figure 8 A publish-subscribe system 200 is shown performing re-encryption using re-encryption process 214. The initial condition for re-encryption could be... Figure 7 The arrangement is shown. Re-encryption using a topic alias such as topic alias ta 212 may include providing a topic, such as topic t1 210. For example, a corresponding topic t1 210 can be created. Additionally, a topic alias ta 212 can be provided. For example, a topic alias ta 212 can be generated. The provided topic alias ta 212 can be assigned to the provided topic t1 210. The topic alias ta 212 can be configured, for example, to use the encryption module of intermediary 202 to encrypt messages m received from producer 206 for storage in the message log of topic t1 210. Producer 206 can send messages m to topic alias ta 212. Furthermore, topic alias ta 212 can be configured, for example, to use the encryption module of intermediary 202 to decrypt encrypted messages stored in the message log of topic t1 210 to recover the original messages m to be sent to consumers 208 subscribing to topic alias ta 212. The corresponding messages m can be encrypted and decrypted using the cryptographic key k1 assigned to topic t1 210. Clients 206 and 208 of the publish-subscribe system 200 can begin sending and receiving messages via the topic alias ta 212.
[0126] To perform a key rotation, i.e., to replace the existing cryptographic key k1 assigned to existing topic t1 210 and used to encrypt message 205 stored in the message log of topic t1 210, re-encryption can be performed. For example, a re-encryption workflow can be performed, including adding an additional topic t2 220. Key rotation can be initiated, for example, by creating an additional encryption key k1 for additional topic t2 220. The encryption module can be updated to encrypt new messages (i.e., messages received by intermediary 202 or the agent) using the additional key k1. The re-encryption process for message 205 stored in the message log of existing topic t1 210 can be started, including copying data from existing topic t1 210 to additional topic t2 220. Copying may include re-encrypting the copied message 205 using the additional key k2. For re-encryption, the corresponding data included in the encrypted form of the existing topic t1 210 can be decrypted using the existing cryptographic key k1 of existing topic t1 210 and encrypted using the additional key k2 of additional topic t2 220. Re-encryption may, for example, involve recovering the original message m = D(k1, c1) using the ciphertext c1 stored in topic t1 210 and the existing cipher key k1. The recovered original message can be re-encrypted using the additional key k2, and the resulting ciphertext c2 = E(k2, m) is stored as the encrypted message 225 in a segment file 221 of the message log in the additional topic t2 220.
[0127] The re-encryption process 214 can append any new messages m arriving during the re-encryption period to the appended topic t2220. These new messages m can be encrypted using the appended cipher key k2 to generate ciphertext c2 = E(k2,m), which is stored in the message log of the appended topic t2 220. When the copying is complete, the topic alias ta 212 can be reassigned to the appended topic t2 220. The appended topic t2 220 can include the re-encrypted data copied from the existing topic t1 210 as well as the new messages encrypted using the appended cipher key k2. Therefore, the existing topic t1 210 can become inactive, while the appended topic t2 220 is activated. Optionally, the previously active topic log, i.e., the message log of the existing topic t1 210, can be deleted, such as... Figure 9 As shown, this leads to... Figure 10As shown in the diagram. For clients 206 and 208 of the publish-subscribe system 200, the generation of the supplementary topic t2 220 and the switching from the existing topic t1 210 to the supplementary topic t2 220 can be invisible. Clients 206 and 208 can continue to communicate with the topic alias ta 212. The message m received from producer 206 can be encrypted using the supplementary cryptographic key k2 to generate ciphertext c2 = E(k2,m), which is stored as encrypted message 225 in the message log of supplementary topic t2 220. Furthermore, the encrypted message 225 stored in the message log of supplementary topic t2 220 can be decrypted using the supplementary cryptographic key k2 to recover the original message m = D(k2,c2) and sent to consumer 208 subscribing to topic alias ta 212. Throughout the execution of the re-encryption process 214, the publish-subscribe system 200 can continue its service, i.e., receiving message m from producer 206 and forwarding the received message m to consumer 208.
[0128] Figure 11 , Figure 12 and Figure 13 They are shown respectively Figure 7 , Figure 8 and Figure 10 An alternative embodiment is provided in which the subject alias ta 212 and the re-encryption process 214 are implemented in the proxy 203 instead of the intermediary 202.
[0129] Figure 14 A schematic flowchart illustrating an exemplary method for cryptographic key rotation in a publish-subscribe system, similar to... Figures 7 to 13 The publish-subscribe system 200. Figure 14 The method corresponds to Figure 6 The method was modified to use topic aliases for cryptographic key rotation. The topic alias points from the first message to the first topic. Subscribers to the common first topic subscribe to the first topic alias. Furthermore, publishers, i.e., producers, can assign messages to the first topic alias. Messages assigned to the first topic alias can be automatically reassigned to the common first topic.
[0130] In box 320, additional common second topics can be added. Boxes 322 to 328 can correspond to... Figure 6In boxes 300 to 306, in box 330, the re-encrypted message is stored in the message log of an additional common second topic added in box 320. In box 332, the publish-subscribe system can switch from routing using the encrypted first message and the assigned first cryptographic key to using the re-encrypted first message and the assigned replacement key. The switch may include reassigning a topic alias from the common first topic that includes the encrypted first message to the common second topic that includes the re-encrypted first message. Furthermore, the previously used encrypted first message and / or the previously used first cryptographic key may be deleted. Deletion may, for example, include the deletion of the common first topic.
[0131] Figure 15 A schematic block diagram illustrates an alternative implementation of reencryption using a mediator reencryption service. The mediator reencryption service can be used in, for example... Figure 4 The intermediary 202 is shown as an example. The intermediary re-encryption service may involve no subject aliases, but rather extends, for example, subject t 210 within the intermediary 202's subject management. For instance, a log cleaner service that performs compression and processes expired intermediaries via a background thread can be extended to include a re-encryption feature to provide a re-encryption service.
[0132] Topic t 210 can consist of multiple partitions, each of which consists of multiple segment files 211. The write process for adding appended messages (i.e., new messages) to topic t 210 may include appending the appended messages to the last opened segment file 211, such as segment file "segment 3". For example, when the maximum retention time of messages stored in the corresponding segment file expires, the closed segment file may be exchanged or deleted simply by the log cleaner service.
[0133] A re-encryption workflow with an intermediary re-encryption service may include issuing a command to re-encrypt an existing topic encrypted with the first cryptographic key using a second (i.e., new) cryptographic key. In response to the command, the re-encryption process can begin. The re-encryption process can be implemented as a background thread. New input messages can be encrypted using the second key. Intermediary 202 can close the current segment file "Segment 3" and open a new segment file 222 "Segment 4". Intermediary 202 can also determine and store the offset value of the message's offset, using this message to begin encryption using the second key.
[0134] The re-encryption of previously received messages, i.e., messages stored in the closed segment files 211 "Segment 1", "Segment 2", and "Segment 3", can be initiated by a background thread. All previously received messages, starting at a determined offset, i.e., all messages encrypted with the previous cipher key, can be re-encrypted, for example, file-by-file. For example, re-encryption can begin with the latest segment file 211 "Segment 3". Once segment file 211 "Segment 3" has been re-encrypted, i.e., decrypted using the previous first cipher key and encrypted using the current second cipher key, the resulting re-encrypted segment file 221 "Segment 3'" is exchanged with the previous segment file 211 "Segment 3". For example, previous segment files 211 "Segment 2" and "Segment 3" containing messages encrypted using the previous cryptographic key can be replaced by re-encrypted segment files 221 "Segment 2'" and "Segment 3'" containing the same messages as the previous segment files 211 "Segment 2" and "Segment 3" which have been re-encrypted using the current second cryptographic key. Once the last message of the last segment file 211, such as the oldest segment file "Segment 2", has been re-encrypted, the re-encryption process can end, and the previous first cryptographic key, i.e., can be discarded. For example, segment file "Segment 1" can be deleted during key rotation due to the expiration of the maximum retention time of the messages included by the corresponding segment file "Segment 1". Therefore, starting re-encryption with the latest "Segment 3" can prevent the publish-subscribe system from unnecessarily re-encrypting segment files, such as "Segment 1", which are later deleted during key rotation.
[0135] It can be optimized as follows Figure 15 The re-encryption shown uses a re-encryption service on intermediary 202 to achieve parallelization. The re-encryption workload can be parallelized, i.e., distributed across multiple intermediaries in the intermediary cluster included in the publish-subscribe system. The example can have beneficial effects such as increasing, for example, optimizing re-encryption speed. A publish-subscribe system can include multiple intermediaries. The internal protocol of the publish-subscribe system can be adapted so that all intermediaries in the publish-subscribe system and their copies of the partitions can coordinate among them, such that each intermediary only re-encrypts a subset of the segment fields of the corresponding partition. Each intermediary then exchanges the re-encrypted subset of segment fields with all other intermediaries that also have copies.
[0136] Figure 16 A schematic flowchart illustrating an exemplary method for cryptographic key rotation in a publish-subscribe system, similar to... Figures 7 to 13 The publish-subscribe system 200. Figure 16 The method corresponds to Figure 6The method was adapted to use a re-encryption service provided by an intermediary in the publish-subscribe system. Segmented files can be used to store messages. If a segmented file is full, subsequent segmented files are used for storage.
[0137] In box 340, the segment file currently used to store the message is closed, and in box 342, an additional segment file is opened for storing the message. The message stored in the additional segment file is encrypted using the replacement key provided in box 346. For example, the replacement key can be provided before any of boxes 340, 342, or 344. In box 344, an offset value that identifies the offset from which the message encrypted with the replacement key begins to be stored can be determined and, for example, stored. Boxes 346 through 352 can correspond to... Figure 6 In boxes 300 to 306, re-encrypting messages in a segmented file can result in a re-encrypted segmented file. In box 354, a stored segmented file can be replaced with a re-encrypted segmented file. For example, re-encryption can begin with the most recent stored segmented file and end when the oldest remaining stored segmented file is reached and re-encrypted.
[0138] This invention can be a system, method, and / or computer program product at any possible level of technical detail integration. The computer program product may include a computer-readable storage medium (or media) having computer-readable program instructions thereon for causing a processor to perform aspects of the invention.
[0139] Computer-readable storage media can be tangible devices capable of retaining and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes the following: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable optical disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices such as punch cards or recessed structures with instructions recorded thereon, and any suitable combination of the foregoing. As used herein, computer-readable storage media should not be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0140] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to a suitable computing / processing device, or via a network, such as the Internet, a local area network (LAN), a wide area network (WAN), and / or a wireless network, to an external computer or external storage device. The network may include copper cables, optical fibers, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to a computer-readable storage medium within the respective computing / processing device.
[0141] Computer-readable program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, integrated circuit configuration data, or source code or object code written in any combination of one or more programming languages (including object-oriented programming languages such as Smalltalk, C++, etc.) and procedural programming languages (such as the "C" programming language or similar programming languages). The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, to perform aspects of this invention, electronic circuits, including, for example, programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute computer-readable program instructions to personalize the electronic circuits by utilizing the status information of the computer-readable program instructions.
[0142] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0143] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / actions specified in one or more blocks of a flowchart and / or block diagram. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and / or other device to operate in a particular manner, such that the computer-readable storage medium in which the instructions are stored includes an article of writing comprising instructions for implementing aspects of the functions / actions specified in one or more blocks of a flowchart and / or block diagram.
[0144] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer-implemented process, such that the instructions, which execute on the computer, other programmable apparatus or other device, perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of instructions comprising one or more executable instructions for implementing a specified logical function. In some alternative embodiments, the functions indicated in the blocks may occur in a non-consecutive order as shown in the figures. For example, two blocks shown consecutively may actually be executed substantially simultaneously, or these blocks may sometimes be executed in reverse order, depending on the functions involved. It will also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified function or action or executes a combination of dedicated hardware and computer instructions.
[0146] Cloud computing is a service delivery model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that can be rapidly provisioned and released with minimal management effort or interaction with service providers. This cloud model may include at least five features, at least three service models, and at least four deployment models.
[0147] The characteristics are as follows.
[0148] On-demand self-service: Cloud consumers can unilaterally and automatically provide computing power, such as server time and network storage, as needed, without requiring manual interaction with the service provider.
[0149] Wide Area Network (WAN) Access: Capabilities are available on the network and accessed through standard mechanisms that facilitate use by heterogeneous thin or thick client platforms (e.g., mobile phones, laptops, and PDAs).
[0150] Resource pooling: A provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, where different physical and virtual resources are dynamically allocated and reallocated based on demand. Location independence is significant because consumers typically do not control or know the exact location of the resources provided, but can specify the location at a higher level of abstraction (e.g., country, state, or data center).
[0151] Rapid Flexibility: In some cases, the ability to scale outwards and inwards quickly and flexibly can be provided. For consumers, the available capacity often appears unlimited and can be purchased in any quantity at any time.
[0152] Measurement services: Cloud systems automatically control and optimize resource usage by leveraging metering capabilities at a level of abstraction appropriate to the service type (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency to both the providers and consumers of the services being utilized.
[0153] The service model is as follows.
[0154] Software as a Service (SaaS): The capability offered to consumers is the ability to use the provider's applications running on cloud infrastructure. Applications can be accessed from various client devices through a thin client interface such as a web browser (e.g., web-based email). Consumers do not manage or control the underlying cloud infrastructure, including the network, servers, operating system, storage, or even individual application capabilities, with the possible exception of limited user-specific application configuration settings.
[0155] Platform as a Service (PaaS): This provides consumers with the ability to deploy consumer-created or acquired applications onto cloud infrastructure using programming languages and tools supported by the provider. Consumers do not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, or storage, but they have control over the deployed applications and the configuration of any application hosting environments.
[0156] Infrastructure as a Service (IaaS): This provides consumers with the capability to deliver processing, storage, networking, and other basic computing resources that enable them to deploy and run arbitrary software, which may include operating systems and applications. Consumers do not manage or control the underlying cloud infrastructure, but they do have control over the operating system, storage, deployed applications, and possibly limited control over selected networking components (e.g., host firewalls).
[0157] The deployment model is as follows.
[0158] Private cloud: Cloud infrastructure operated solely by an organization. It can be managed by the organization or a third party and can exist on-site or off-site.
[0159] Community cloud: Cloud infrastructure shared by several organizations and supporting a specific community with shared concerns (e.g., tasks, security requirements, policies, and compliance considerations). It can be managed by an organization or a third party and can exist on-site or off-site.
[0160] Public cloud: Cloud infrastructure available to the general public or large industrial groups and owned by organizations that sell cloud services.
[0161] Hybrid cloud: A cloud infrastructure is a combination of two or more clouds (private, community, or public) that remain a single entity but are bound together by standardized or proprietary technologies that enable data and applications to be ported together (e.g., cloud bursting for load balancing between clouds).
[0162] Cloud computing environments are service-oriented, focusing on statelessness, loose coupling, modularity, and semantic interoperability. At the heart of cloud computing is the infrastructure of a network of interconnected nodes.
[0163] Now for reference Figure 17 This describes an illustrative cloud computing environment 50. As shown, the cloud computing environment 50 includes one or more cloud computing nodes 10 to which local computing devices used by cloud consumers can communicate, such as personal digital assistants (PDAs) or cellular phones 54A, desktop computers 54B, laptop computers 54C, and / or automotive computer systems 54N. The nodes 10 can communicate with each other. They can be physically or virtually grouped (not shown) in one or more networks, such as private clouds, community clouds, public clouds, or hybrid clouds, or combinations thereof, as described above. This allows the cloud computing environment 50 to provide infrastructure, platform, and / or software as a service, without requiring cloud consumers to maintain resources on their local computing devices. It should be understood that... Figure 1The types of computing devices 54A-N shown are for illustrative purposes only, and computing node 10 and cloud computing environment 50 can communicate with any type of computerized device via any type of network and / or network-addressable connection (e.g., using a web browser).
[0164] Now for reference Figure 18 This demonstrates a cloud computing environment of 50 ( Figure 17 This provides a set of functional abstractions. It should be understood beforehand that... Figure 18 The components, layers, and functions shown are for illustrative purposes only, and embodiments of this disclosure are not limited thereto. As depicted, the following layers and corresponding functions are provided:
[0165] The hardware and software layer 60 includes hardware and software components. Examples of hardware components include: a host 61; a server 62 based on a RISC (Reduced Instruction Set Computer) architecture; a server 63; a blade server 64; a storage device 65; and network and networking components 66. In some embodiments, software components include network application server software 67 and database software 68.
[0166] The virtualization layer 70 provides an abstraction layer from which the following examples of virtual entities can be provided: virtual server 71; virtual storage 72; virtual network 73, including virtual private network; virtual application and operating system 74; and virtual client 75.
[0167] In one example, management layer 80 may provide the following functionalities: Resource Provisioning 81 provides dynamic procurement of computing resources and other resources used to perform tasks within the cloud computing environment. Metering and Pricing 82 provides cost tracking when utilizing resources in the cloud computing environment, as well as billing or invoicing for consuming these resources. In one example, these resources may include application software licenses. Security provides authentication for cloud consumers and tasks, and protection for data and other resources. User Portal 83 provides access to the cloud computing environment for consumers and system administrators. Service Level Management 84 provides cloud resource allocation and management to ensure the required service level is met. Service Level Agreement (SLA) Planning and Fulfillment 85 provides pre-scheduling and procurement of cloud resources, where future needs are anticipated according to the SLA.
[0168] Workload layer 90 provides examples of functionalities that can be leveraged in a cloud computing environment. Examples of workloads and functionalities that can be provided from this layer include: mapping and navigation 91; software development and lifecycle management 92; virtual classroom education delivery 93; data analytics and processing 94; transaction processing 95; and cryptographic key rotation in a publish-subscribe system 96.
Claims
1. A method for password key rotation in a publish-subscribe system, wherein: the publish-subscribe system stores a plurality of messages, each of the plurality of stored messages being assigned to a topic from a group of topics, each of the stored messages being assigned a password key from a group of one or more password keys and being encrypted with the assigned password key; the publish-subscribe system provides a mediation service for routing the stored messages to one or more subscribers of a topic to which a routed message is assigned, the routing including decrypting a message to be routed using the assigned password key of the respective message, and sending the decrypted message to the one or more subscribers of the assigned topic; and the password key rotation includes re-encryption of each message in a first set of one or more first messages of the stored messages, each of the first messages being assigned to a common first topic from the group of topics, being assigned a first password key from a first set of one or more first password keys of the group of password keys, and being encrypted with the assigned first password key, the re-encryption being performed by an encryption module of the publish-subscribe system as a background process while continuing to route the first messages from the mediation service and receiving additional first messages for the common first topic by the mediation service; the re-encryption includes: adding a second set of one or more second password keys to the group of password keys, each of the second password keys being a replacement key for one of the first password keys; and for each of the first messages: decrypting the encrypted first message using the first password key assigned to the respective first message; re-encrypting the decrypted first message using the replacement key for the assigned first password key; assigning the replacement key for the re-encrypted first message; and switching from using the encrypted first message and the assigned first password key to using the re-encrypted first message and the assigned replacement key for the routing, wherein each of the stored messages is stored as a member of a topic to which the respective message is assigned, the method further comprising: providing a first topic alias pointing to the common first topic from the first set of messages, the one or more subscribers of the common first topic subscribing to the first topic alias, adding an additional common second topic to the group of topics; and storing the re-encrypted first messages as members of the common second topic, wherein the switching includes re-assigning the first topic alias to the common second topic so that the one or more subscribers subscribing to the first topic alias become subscribers of the common second topic.
2. The method of claim 1, wherein, the encryption module is comprised by a broker of the publish-subscribe system.
3. The method of claim 1, wherein, the encryption module is comprised by a proxy of the publish-subscribe system, the mediation of the publish-subscribe system communicating with clients of the publish-subscribe system via the proxy.
4. The method of claim 1, wherein, The encrypted messages stored in the publish-subscribe system are each provided with a header that identifies an assigned cryptographic key of the group of cryptographic keys.
5. The method of claim 4, wherein, The headers identifying assigned cryptographic keys are removed during the routing before the decrypted messages being routed are sent to the subscribers.
6. The method of claim 4, wherein, The headers of the encrypted messages each include the identified cryptographic key in an encrypted form using envelope encryption with an envelope encryption key, wherein the decryption of each of the encrypted first messages further includes decrypting the assigned first cryptographic key provided by the header of the respective first message using the envelope encryption key, wherein the re-encryption of each of the decrypted first messages further includes encrypting an assigned replacement key for re-encrypting the respective re-encrypted first message with the envelope encryption key and replacing the encrypted first cryptographic key in the header of the respective re-encrypted first message with the encrypted replacement key.
7. The method of claim 1, wherein, The publish-subscribe system includes an index that identifies for each stored message an assigned cryptographic key of the group of cryptographic keys.
8. The method of claim 7, wherein, The re-encryption further includes for each of the first messages: identifying the first cryptographic key assigned to the respective first message using the index; assigning the replacement key for the identified first cryptographic key to the re-encrypted first message in the index.
9. The method of claim 1, wherein, The switch further includes deleting the common first topic with the first encrypted messages.
10. The method of claim 1, wherein, The switch further includes deleting the first cryptographic keys.
11. The method of claim 1, wherein, Additional first messages for the first topic alias received by the publish-subscribe system from publishers are each assigned to the common second topic, assigned one of the second cryptographic keys of the second set of second cryptographic keys, and encrypted using the assigned second cryptographic key.
12. The method of claim 1, wherein, Switching encrypted first messages with assigned first cryptographic keys to re-encrypted first messages with assigned replacement keys includes replacing each of the encrypted first messages with a corresponding re-encrypted first message.
13. The method of claim 12, wherein: storing encrypted first messages in a set of segment files, one segment file of the set of segment files currently being used to store encrypted first messages, closing remaining segment files of the set of segment files that have been filled with encrypted first messages, closing an open segment file if the open segment file is full, adding an additional segment file to the set of segment files, and using the additional segment file to store encrypted first messages; upon starting the re-encryption, closing the segment file currently being used to store encrypted first messages and adding another additional segment file to the set of segment files and using the additional segment file to store additional encrypted first messages for the common first topic received by the publish-subscribe system from publishers; and performing re-encryption of the encrypted first messages in segments, wherein the segment re-encryption comprises selecting one after another of the remaining closed segment files, generating for each selected segment file a replacement segment file comprising the encrypted first message of the selected segment file in encrypted form, and replacing the selected segment file with the replacement segment file.
14. The method of claim 13, wherein, The segment re-encryption starts with the most recent segment file of the set of segment files.
15. The method of claim 13, wherein, determining an offset value identifying an offset of an additional first message with which encryption using the second cryptographic key is started within a storage of the publish-subscribe system.
16. The method of claim 13, wherein, additional first messages received by the publish-subscribe system from publishers for the common first topic are each assigned to the common first topic, assigned one of the second cryptographic keys of the second set of second cryptographic keys, and encrypted using the assigned second cryptographic key.
17. The method of claim 13, wherein, The publish-subscribe system comprises a plurality of additional intermediates, wherein the publish-subscribe system comprises a plurality of additional copies of the set of segment files, wherein each of the additional copies is assigned to one of the additional intermediates, wherein the re-encryption of the segment files is distributed among the additional intermediates of the publish-subscribe system implementing parallelization of the re-encryption, wherein the re-encrypted first messages are distributed to other copies of the set of segment files.
18. A computer program product for cryptographic key rotation in a publish-subscribe system, the computer program product comprising: program instructions executable by a processor of a computer system of the publish-subscribe system to cause the computer system to perform the cryptographic key rotation, wherein: the publish-subscribe system stores a plurality of messages, each of the plurality of stored messages is assigned to a topic from a group of topics, each of the stored messages is assigned a cryptographic key of a group of one or more cryptographic keys and encrypted with the assigned cryptographic key; the publish-subscribe system provides an intermediary service for routing the stored messages to one or more subscribers of a topic to which a routed message is assigned, the routing comprising decrypting a message to be routed using the assigned cryptographic key of the respective message and sending the decrypted message to the one or more subscribers of the assigned topic; and the cryptographic key rotation comprises re-encryption of each message of a first set of one or more first messages of the stored messages, each of the first messages is assigned to a common first topic from the group of topics, assigned a first cryptographic key of a first set of one or more first cryptographic keys of the group of cryptographic keys, and encrypted with the assigned first cryptographic key, the re-encryption is performed by an encryption module of the publish-subscribe system as a background process while continuing to route the first messages from and receive additional first messages for the common first topic by the intermediary service; the re-encryption comprises: adding a second set of one or more second cryptographic keys to the group of cryptographic keys, each of the second cryptographic keys being a replacement key for one of the first cryptographic keys; and for each of the first messages: decrypting the encrypted first message using the first cryptographic key assigned to the respective first message; re-encrypting the decrypted first message using a replacement key for the assigned first cryptographic key; assigning the replacement key for the re-encrypted first message; and switching from using the encrypted first message and the assigned first cryptographic key to using the re-encrypted first message and the assigned replacement key, wherein each of the stored messages is stored as a member of a topic to which the respective message is assigned, the publish-subscribe system further performing the following operations: providing a first topic alias pointing to the common first topic from the first set of messages, the one or more subscribers of the common first topic subscribing to the first topic alias, adding an additional common second topic to the group of topics; and storing the re-encrypted first message as a member of the common second topic, wherein the switching includes re-assigning the first topic alias to the common second topic such that the one or more subscribers subscribing to the first topic alias become subscribers of the common second topic.
19. A computer system for cryptographic key rotation in a publish-subscribe system, wherein: the publish-subscribe system stores a plurality of messages, each of the plurality of stored messages being assigned to a topic from a group of topics, each of the stored messages being assigned a cryptographic key from a group of one or more cryptographic keys and being encrypted with the assigned cryptographic key; the publish-subscribe system provides a mediation service for routing a stored message to one or more subscribers of a topic to which the routed message is assigned, the routing including decrypting the message to be routed using the assigned cryptographic key of the respective message and sending the decrypted message to the one or more subscribers of the assigned topic; and the cryptographic key rotation includes re-encryption of each of a first set of one or more first messages of the stored messages, each of the first messages being assigned to a common first topic from the group of topics, being assigned a first cryptographic key from a first set of one or more first cryptographic keys of the group of cryptographic keys, and being encrypted with the assigned first cryptographic key, the re-encryption being performed by an encryption module of the publish-subscribe system as a background process while continuing to route first messages from and receive additional first messages for the common first topic by the mediation service; the computer system includes a processor and a memory storing program instructions executable by the processor, wherein execution of the program instructions by the processor causes the computer system to perform the re-encryption including: adding a second set of one or more second cryptographic keys to the group of cryptographic keys, each of the second cryptographic keys being a replacement key for one of the first cryptographic keys; and For each of the first messages: decrypt the encrypted first message using the first cryptographic key assigned to the respective first message; re-encrypt the decrypted first message using a replacement key for the assigned first cryptographic key; assign the replacement key for the re-encrypted first message; and switch from using the encrypted first message and the assigned first cryptographic key to using the re-encrypted first message and the assigned replacement key, wherein each of the stored messages is stored as a member of the topic to which the respective message was assigned, the publish-subscribe system further performs the following operations: provide a first topic alias pointing to the common first topic from the first set of messages, the one or more subscribers of the common first topic subscribing to the first topic alias, add an additional common second topic to the group of topics; and store the re-encrypted first message as a member of the common second topic, wherein the switch includes re-assigning the first topic alias to the common second topic such that the one or more subscribers subscribing to the first topic alias become subscribers of the common second topic.
Citation Information
Patent Citations
Data encryption and conversion for independent agents
CN102262721A