Docker's Remote API can be secured via TLS and client certificate verification.
First of all you need a few certificates and keys:
- CA certificate
- Server certificate
- Server key
- Client certificate
- Client key
import org.sonatype.nexus.common.entity.* | |
import org.sonatype.nexus.security.* | |
import org.sonatype.nexus.security.authz.* | |
import org.sonatype.nexus.selector.* | |
import com.google.common.collect.ImmutableMap | |
// use container.lookup to fetch internal APIs we need to use | |
def selectorManager = container.lookup(SelectorManager.class.name) | |
def securitySystem = container.lookup(SecuritySystem.class.name) |
@EnableOAuth2Sso | |
@RestController | |
@SpringBootApplication | |
public class OAuth2DemoApplication_1_5 { | |
@Value("#{ @environment['security.oauth2.resource.server'] }") | |
private String resourceServerUrl; | |
private OAuth2ProtectedResourceDetails resource; |
#!/bin/bash | |
# This script will help you setup Docker for TLS authentication. | |
# Run it passing in the arguement for the FQDN of your docker server | |
# | |
# For example: | |
# ./create-docker-tls.sh myhost.docker.com | |
# | |
# The script will also create a profile.d (if it exists) entry | |
# which configures your docker client to use TLS | |
# |
diff --git a/pymongo/connection.py b/pymongo/connection.py | |
index b444f50..7635c78 100644 | |
--- a/pymongo/connection.py | |
+++ b/pymongo/connection.py | |
@@ -46,6 +46,7 @@ from pymongo import (database, | |
helpers, | |
message) | |
from pymongo.cursor_manager import CursorManager | |
+from pymongo.decorators import reconnect | |
from pymongo.errors import (AutoReconnect, |
#!/bin/bash | |
KC_REALM=<insert realm name here> | |
KC_USERNAME=<username here> | |
KC_PASSWORD=<password here> | |
KC_CLIENT=<client name here> | |
KC_CLIENT_SECRET=<client secret here> | |
KC_SERVER=<server address and port here> | |
KC_CONTEXT=auth |
## Sublime Text 3 Serial key build is 3176 | |
> * Added these lines into /etc/hosts | |
127.0.0.1 www.sublimetext.com | |
127.0.0.1 license.sublimehq.com | |
> * Used the license key | |
----- BEGIN LICENSE ----- |
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
public class AnnotationHelper { | |
private static final String ANNOTATIONS = "annotations"; | |
public static final String ANNOTATION_DATA = "annotationData"; | |
public static boolean isJDK7OrLower() { | |
boolean jdk7OrLower = true; | |
try { | |
Class.class.getDeclaredField(ANNOTATIONS); | |
} catch (NoSuchFieldException e) { | |
//Willfully ignore all exceptions |