Skip to content

Commit

Permalink
Change default Redis keys for SecurityInfo storage
Browse files Browse the repository at this point in the history
  • Loading branch information
aliakseiz committed Feb 21, 2023
1 parent ffb14c0 commit 070aa87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

If you plan to contribute to Leshan please take few minutes to read our [Contribution Guide](https://github.com/eclipse/leshan/wiki/How-to-contribute).

If you are confortable with **java**, **maven**, **git** and **github PR flow**, you can just read the [legal stuff](https://github.com/eclipse/leshan/wiki/How-to-contribute#legal-stuff-) and our [code&design guidelines](https://github.com/eclipse/leshan/wiki/Code-&-design-guidelines).
If you are comfortable with **java**, **maven**, **git** and **github PR flow**, you can just read the [legal stuff](https://github.com/eclipse/leshan/wiki/How-to-contribute#legal-stuff-) and our [code&design guidelines](https://github.com/eclipse/leshan/wiki/Code-&-design-guidelines).

Thanks a lot !
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@

/**
* A {@link SecurityStore} implementation based on Redis.
*
* Security info are stored using the endpoint as primary key and a secondary index is created for psk-identity lookup.
* <p>
* Security info are stored using the endpoint as primary key and a secondary index is created for endpoint lookup by
* PSK identity.
* <p>
* By default, uses {@code SEC#EP#} key prefix to find security info by endpoint and {@code EP#PSKID} key to get the
* endpoint by PSK ID. Leshan v1.x used {@code SEC#EP#} and {@code PSKID#SEC} keys for that accordingly.
*/
public class RedisSecurityStore implements EditableSecurityStore {

Expand All @@ -49,7 +53,7 @@ public class RedisSecurityStore implements EditableSecurityStore {
private final List<SecurityStoreListener> listeners = new CopyOnWriteArrayList<>();

public RedisSecurityStore(Pool<Jedis> pool) {
this(pool, "SEC#EP#", "PSKID#SEC");
this(pool, "SEC#EP#", "EP#PSKID");
}

public RedisSecurityStore(Pool<Jedis> pool, String securityInfoByEndpointPrefix, String endpointByPskIdKey) {
Expand Down

0 comments on commit 070aa87

Please sign in to comment.