Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize security documentation [DOCS-104] #1263

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a5a60cb
Reorganize Security sections and introduce GitHub workflows to valida…
kwart Aug 20, 2024
c2b3eb9
Fix TLS authentication page
kwart Aug 26, 2024
e85bc40
Improve TLS authn snippets; Describe skip-* login options in authenti…
kwart Aug 26, 2024
0b53a29
Update docs/modules/clients/pages/java.adoc
kwart Sep 9, 2024
032b8d0
Merge remote-tracking branch 'upstream/main' into cleanup/6.0/security
kwart Sep 9, 2024
469f310
Update docs/modules/clients/pages/java.adoc
kwart Sep 9, 2024
60f5c63
Update docs/modules/cluster-performance/pages/performance-tuning.adoc
kwart Sep 9, 2024
bfdb3bc
Update docs/modules/secure-cluster/pages/security-defaults.adoc
kwart Sep 9, 2024
6dd1195
Update docs/modules/secure-cluster/pages/security-defaults.adoc
kwart Sep 9, 2024
512feb5
Update docs/modules/clients/pages/java.adoc
kwart Sep 9, 2024
c6288cd
Update docs/modules/security/pages/client-authorization.adoc
kwart Sep 9, 2024
26eff01
Update docs/modules/spring/pages/configuration.adoc
kwart Sep 9, 2024
1d4a73f
Update docs/modules/security/pages/simple-authentication.adoc
kwart Sep 9, 2024
09736b8
Update docs/modules/security/pages/authentication-overview.adoc
kwart Sep 9, 2024
dbc420b
Remove the leftover native-client-security page
kwart Sep 9, 2024
0801e83
Update docs/modules/security/pages/authentication-overview.adoc
kwart Sep 9, 2024
5d15013
Update docs/modules/security/pages/enabling-security.adoc
kwart Sep 9, 2024
5642398
Update docs/modules/security/pages/overview.adoc
kwart Sep 9, 2024
3887a9e
Describe what the LDAP server is
kwart Sep 9, 2024
e9b2be4
Add authentication definition
kwart Sep 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/maven-pr-builder.yaml
kwart marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Compile Java source files

on:
pull_request:
kwart marked this conversation as resolved.
Show resolved Hide resolved
branches:
- main
paths:
- '**/*.java'
- 'pom.xml'
- 'docs/antora.yml'
- '.github/workflows/maven-pr-builder.yaml'

jobs:
build:
runs-on: ubuntu-latest

steps:
kwart marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/checkout@v3
kwart marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/setup-java@v4
with:
java-version: '17'
kwart marked this conversation as resolved.
Show resolved Hide resolved
distribution: 'temurin'
cache: 'maven'
- name: Maven compile
run: |
HZ_VERSION=$(grep full-version docs/antora.yml|sed "s/.*:[ ]*'\(.*\)'/\1/")
mvn --show-version --batch-mode --no-transfer-progress test "-Dhazelcast.version=$HZ_VERSION"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ package-lock.json
.project
.settings/
.vscode/settings.json
/target/
.classpath
4 changes: 3 additions & 1 deletion docs/modules/ROOT/examples/dds/map/Employee.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import com.hazelcast.core.HazelcastJsonValue;

//tag::emp[]
public class Employee {
public static HazelcastJsonValue asJson(String surname) {
return new HazelcastJsonValue("{ \"surname\": \"" + surname + "\" }");
}
}
//end::emp[]
//end::emp[]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import com.hazelcast.core.EntryEvent;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.HazelcastJsonValue;
import com.hazelcast.map.IMap;
import com.hazelcast.map.listener.EntryAddedListener;
import com.hazelcast.map.listener.EntryRemovedListener;
Expand Down Expand Up @@ -41,4 +42,4 @@ public void entryUpdated(EntryEvent<String, HazelcastJsonValue> event) {
}
}
}
//end::lwp[]
//end::lwp[]
21 changes: 0 additions & 21 deletions docs/modules/ROOT/examples/dds/map/Modify.java

This file was deleted.

4 changes: 3 additions & 1 deletion docs/modules/ROOT/examples/dds/map/Supplement.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package dds.map;

import java.io.Serializable;


Expand All @@ -18,4 +20,4 @@ public String getName() {
public Integer getPrice() {
return price;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package dds.map;

import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.map.MapLoaderLifecycleSupport;
import com.hazelcast.map.MapStore;
Expand Down Expand Up @@ -106,4 +108,4 @@ public void delete(String key) {
public void deleteAll(Collection<String> keys) {
this.collection.deleteMany(in("_id", keys));
}
}
}
8 changes: 4 additions & 4 deletions docs/modules/ROOT/examples/dds/queue/ConsumerMember.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ public class ConsumerMember {

public static void main( String[] args ) throws Exception {
HazelcastInstance hz = Hazelcast.newHazelcastInstance();
IQueue<Integer> queue = hz.getQueue( "queue" ); <1>
IQueue<Integer> queue = hz.getQueue( "queue" ); // <1>
while ( true ) {
int item = queue.take(); <2>
int item = queue.take(); // <2>
System.out.println( "Consumed: " + item );
if ( item == -1 ) {
queue.put( -1 );
break;
}
Thread.sleep( 5000 ); <3>
Thread.sleep( 5000 ); // <3>
}
System.out.println( "Consumer Finished!" );
}
}
//end::consumer[]
//end::consumer[]
6 changes: 3 additions & 3 deletions docs/modules/ROOT/examples/dds/queue/ProducerMember.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ public class ProducerMember {

public static void main( String[] args ) throws Exception {
HazelcastInstance hz = Hazelcast.newHazelcastInstance();
IQueue<Integer> queue = hz.getQueue( "queue" ); <1>
IQueue<Integer> queue = hz.getQueue( "queue" ); // <1>

<2>
// <2>
for ( int k = 1; k < 100; k++ ) {
queue.put( k );
System.out.println( "Producing: " + k );
Expand All @@ -19,4 +19,4 @@ public static void main( String[] args ) throws Exception {
System.out.println( "Producer Finished!" );
}
}
//end::producer[]
//end::producer[]
4 changes: 2 additions & 2 deletions docs/modules/ROOT/examples/dds/queue/TheQueueStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void deleteAll(Collection<Long> keys) {
}

@Override
<1>
// <1>
public Item load(Long key) {
System.out.println("load");
return null;
Expand All @@ -46,4 +46,4 @@ public Set<Long> loadAllKeys() {
return null;
}
}
//end::qs[]
//end::qs[]
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import com.hazelcast.config.Config;
import com.hazelcast.config.MergePolicyConfig;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.scheduledexecutor.IScheduledExecutorService;
import com.hazelcast.config.ScheduledExecutorConfig;

public class ScheduledExecutorConfiguration {
public static void main(String[] args) throws Exception{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,17 @@ public void entryUpdated(EntryEvent<String, String> event) {
public void mapCleared(MapEvent event) {
System.out.println( "Map Cleared: " + event );
}
@Override
public void entryRemoved(EntryEvent<String, String> event) {
}
@Override
public void entryEvicted(EntryEvent<String, String> event) {
}
@Override
public void entryExpired(EntryEvent<String, String> event) {
}
@Override
public void mapEvicted(MapEvent event) {
}
}
//end::mm[]
//end::mm[]
6 changes: 3 additions & 3 deletions docs/modules/ROOT/examples/distributedevents/Listen.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.HazelcastClient;
import com.hazelcast.client.HazelcastClient;
import com.hazelcast.map.IMap;
import com.hazelcast.map.MapEvent;
import com.hazelcast.core.EntryEvent;
Expand All @@ -10,7 +10,7 @@
public class Listen {

public static void main( String[] args ) {
HazelcastInstance hz = HazelcastClient.newHazelcastCllient();
HazelcastInstance hz = HazelcastClient.newHazelcastClient();
IMap<String, String> map = hz.getMap( "somemap" );
map.addEntryListener( new MyEntryListener(), true );
System.out.println( "EntryListener registered" );
Expand Down Expand Up @@ -60,4 +60,4 @@ public void mapCleared( MapEvent event ) {
}
}
}
//end::listen[]
//end::listen[]
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package jcache;

import javax.cache.Cache;
import javax.cache.CacheManager;
import javax.cache.Caching;
Expand Down Expand Up @@ -37,4 +39,4 @@ public static void main(String[] args){
System.out.println( value );
//end::jcacheapp[]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package jcache;

import com.hazelcast.cache.ICache;
import com.hazelcast.cache.impl.event.CachePartitionLostEvent;
import com.hazelcast.cache.impl.event.CachePartitionLostListener;
Expand Down Expand Up @@ -34,4 +36,4 @@ public void partitionLost(CachePartitionLostEvent event) {
});
}
}
//end::pllu[]
//end::pllu[]
4 changes: 3 additions & 1 deletion docs/modules/ROOT/examples/jcache/User.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package jcache;

import java.io.Serializable;

@SuppressWarnings("unused")
Expand Down Expand Up @@ -66,4 +68,4 @@ public String toString() {
+ ", username='" + username + '\''
+ '}';
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package jcache;

import javax.cache.event.CacheEntryCreatedListener;
import javax.cache.event.CacheEntryEvent;
import javax.cache.event.CacheEntryExpiredListener;
Expand Down Expand Up @@ -45,4 +47,4 @@ private void printEvents(Iterable<CacheEntryEvent<? extends Integer, ? extends U
}
}
}
//end::ucel[]
//end::ucel[]
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package jcache;

import javax.cache.configuration.Factory;
import javax.cache.event.CacheEntryListener;

Expand All @@ -10,4 +12,4 @@ public CacheEntryListener<Integer, User> create() {
return new UserCacheEntryListener();
}
}
//end::ucelf[]
//end::ucelf[]
4 changes: 3 additions & 1 deletion docs/modules/ROOT/examples/jcache/UserCacheLoader.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package jcache;

import javax.cache.integration.CacheLoader;
import javax.cache.integration.CacheLoaderException;
import java.io.Serializable;
Expand Down Expand Up @@ -36,4 +38,4 @@ public Map<Integer, User> loadAll(Iterable<? extends Integer> keys) throws Cache
return loaded;
}
}
//end::ucl[]
//end::ucl[]
4 changes: 3 additions & 1 deletion docs/modules/ROOT/examples/jcache/UserCacheWriter.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package jcache;

import javax.cache.Cache;
import javax.cache.integration.CacheWriter;
import javax.cache.integration.CacheWriterException;
Expand Down Expand Up @@ -55,4 +57,4 @@ public void deleteAll(Collection<?> keys) throws CacheWriterException {
}
}
}
//end::ucw[]
//end::ucw[]
4 changes: 3 additions & 1 deletion docs/modules/ROOT/examples/jcache/UserDao.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package jcache;

import java.util.Collection;

//tag::userdao[]
Expand All @@ -8,4 +10,4 @@ public interface UserDao {
boolean removeUser(int userId);
Collection<Integer> allUserIds();
}
//end::userdao[]
//end::userdao[]
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package jcache;

import javax.cache.processor.EntryProcessor;
import javax.cache.processor.EntryProcessorException;
import javax.cache.processor.MutableEntry;
Expand Down Expand Up @@ -34,4 +36,4 @@ public User process(MutableEntry<Integer, User> entry, Object... arguments) thro
return user;
}
}
//end::uuep[]
//end::uuep[]
2 changes: 2 additions & 0 deletions docs/modules/ROOT/examples/security/CredentialsCallback.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package security;

import com.hazelcast.security.Credentials;

import javax.security.auth.callback.Callback;
Expand Down
2 changes: 2 additions & 0 deletions docs/modules/ROOT/examples/security/CustomLoginModule.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package security;

import com.hazelcast.security.Credentials;

import javax.security.auth.Subject;
Expand Down
Loading
Loading