Skip to content

Instantly share code, notes, and snippets.

View tristantarrant's full-sized avatar
🏠
Working from home

Tristan Tarrant tristantarrant

🏠
Working from home
  • Red Hat
  • Italy
View GitHub Profile
@tristantarrant
tristantarrant / WildcardTemplateJCache.java
Last active February 2, 2018 08:27
Infinispan Wildcard Configuration Template (JCache)
CachingProvider cachingProvider = Caching.getCachingProvider();
CacheManager cacheManager = cachingProvider.getCacheManager(
this.getClass().getResource("wildcard.xml").toURI(),
this.getClass().getClassLoader()
);
Cache<Object, Object> basiccache1 = cacheManager.createCache(
"basiccache1",
new MutableConfiguration<>()
);
@tristantarrant
tristantarrant / WildcardTemplate.java
Last active February 2, 2018 08:26
Infinispan Wildcard Configuration Template (programmatic)
EmbeddedCacheManager cm = new DefaultCacheManager();
cm.defineConfiguration("basecache*", new ConfigurationBuilder()
.expiration().lifespan(10)
.build());
Cache<Object, Object> basecache1 = cm.getCache("basecache1");
@tristantarrant
tristantarrant / wildcard.xml
Created February 2, 2018 08:01
Infinispan Configuration Template Wildcards
<infinispan>
<cache-container>
<local-cache-configuration name="basecache*">
<expiration interval="10500" lifespan="11" max-idle="11"/>
</local-cache-configuration>
<local-cache name="basecache-1"/>
<local-cache name="basecache-2"/>
</cache-container>
</infinispan>
@tristantarrant
tristantarrant / people.json
Created January 16, 2018 13:04
Infinispan team gnome-shell timezone extension
[
{
"github": "anistor",
"tz": "Europe/Bucharest"
},
{
"github": "danberindei",
"tz": "Europe/Bucharest"
},
{
@tristantarrant
tristantarrant / infinispan-weekly-irc-logs-2017-08-28.txt
Created August 29, 2017 12:00
Infinispan Weekly IRC logs 2017-08-28
Aug 28 16:02:56 <ttarrant> #startmeeting
Aug 28 16:03:16 <jsenko> ttarrant: skip me pls for now
Aug 28 16:03:25 <ttarrant> I guess jbott is out of order
Aug 28 16:03:39 * rettori_argh (~rettori@144.121.20.163) has joined
Aug 28 16:03:39 * rettori_argh is now known as rettori
Aug 28 16:03:45 <ttarrant> #topic ttarrant
Aug 28 16:04:09 <ttarrant> not much to report
Aug 28 16:04:17 <ttarrant> as I've been on PTO for two weeks
Aug 28 16:04:21 <ttarrant> very much rested
Aug 28 16:04:36 <ttarrant> so much that I'll be on PTO again for the first four days next week too :)
<cache-container default-cache="default">
<local-cache name="default">
<persistence passivation="false">
<cloud-store xmlns="urn:infinispan:config:store:cloud:8.0"
provider="transient"
location="test-location"
identity="me"
credential="s3cr3t"
container="test-container"
endpoint="http://test.endpoint"
ConfigurationBuilder b = new ConfigurationBuilder();
b.persistence().addStore(CloudStoreConfigurationBuilder.class)
.provider("transient")
.location("test-location")
.identity("me")
.credential("s3cr3t")
.endpoint("http://test.endpoint")
.compress(true);
@tristantarrant
tristantarrant / host-xsite.xml
Created March 15, 2016 09:40
Infinispan 8.2 Host configuration for multiple sites
<?xml version="1.0" ?>
<host xmlns="urn:jboss:domain:4.0" name="master">
<extensions>
<extension module="org.jboss.as.jmx"/>
</extensions>
<management>
<security-realms>
<security-realm name="ManagementRealm">
<authentication>
@tristantarrant
tristantarrant / domain-xsite.xml
Last active March 15, 2016 10:17
Infinispan 8.2 Domain configuration for multiple sites
<?xml version="1.0" ?>
<domain xmlns="urn:jboss:domain:4.0">
<extensions>
<extension module="org.infinispan.extension"/>
<extension module="org.infinispan.server.endpoint"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.jdr"/>
<extension module="org.jboss.as.jmx"/>
<extension module="org.jboss.as.logging"/>

Securing the management interface

Standalone mode

Create the keystore and put it in the standalone configuration directory:

$ keytool -genkeypair -alias InfinispanServer -storetype jks -keyalg RSA -keysize 2048 -keypass mysecurepassword -keystore standalone/configuration/infinispan.jks -storepass mysecurepassword -dname "CN=InfinispanServer,OU=JBoss,DC=RedHat,DC=COM" -validity 3650 -v
Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 3,650 days
	for: CN=InfinispanServer, OU=JBoss, DC=RedHat, DC=COM