This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cPickle | |
import logging | |
import redis | |
TIMEOUT = 60 * 60 | |
_redis = None | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.realkinetic.gcp.spring.oidc; | |
import com.auth0.jwt.JWT; | |
import com.auth0.jwt.algorithms.Algorithm; | |
import com.auth0.jwt.interfaces.DecodedJWT; | |
import com.google.api.client.http.*; | |
import com.google.api.client.http.javanet.NetHttpTransport; | |
import com.google.api.client.json.JsonObjectParser; | |
import com.google.api.client.json.jackson2.JacksonFactory; | |
import com.google.api.client.util.GenericData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
port: 9292 | |
logging.level: debug | |
logging.recovery: true | |
#logging.raft: true | |
#logging.nats: true | |
data.dir: /tmp/liftbridge/server-a | |
nats.embedded: true | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import sys | |
def parse(input_file_name, output_file_name): | |
with open(input_file_name) as f: | |
data = json.load(f) | |
vpcs = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
jsonPayload.CONNECTION.src_ip, | |
jsonPayload.CONNECTION.dest_ip, | |
jsonPayload.src_instance.region AS src_region, | |
jsonPayload.src_instance.zone AS src_zone, | |
jsonPayload.src_instance.vm_name AS src_vm, | |
jsonPayload.dest_instance.region AS dest_region, | |
jsonPayload.dest_instance.zone AS dest_zone, | |
jsonPayload.dest_instance.vm_name AS dest_vm, | |
jsonPayload.src_vpc.vpc_name AS src_vpc, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == '__main__': | |
app = create_app() | |
server = SocketIOServer( | |
('0.0.0.0', 5000), | |
SharedDataMiddleware(app, {}), | |
policy_server=False) | |
server.serve_forever() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private DecodedJWT getGoogleIdToken() throws IOException { | |
String jwt = getSignedJwt(); | |
final GenericData tokenRequest = new GenericData() | |
.set("grant_type", JWT_BEARER_TOKEN_GRANT_TYPE) | |
.set("assertion", jwt); | |
final UrlEncodedContent content = new UrlEncodedContent(tokenRequest); | |
final HttpRequestFactory requestFactory = httpTransport.createRequestFactory(); | |
final HttpRequest request = requestFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: web | |
namespace: default | |
annotations: | |
beta.cloud.google.com/backend-config: '{"default": "config-default"}' | |
spec: | |
ports: | |
- port: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: cloud.google.com/v1beta1 | |
kind: BackendConfig | |
metadata: | |
name: config-default | |
namespace: default | |
spec: | |
iap: | |
enabled: true | |
oauthclientCredentials: | |
secretName: iap-oauth-client-id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: basic-ingress | |
annotations: | |
kubernetes.io/ingress.global-static-ip-name: "web-static-ip" | |
networking.gke.io/managed-certificates: "iap-demo" | |
spec: | |
backend: | |
serviceName: web |
NewerOlder