Skip to content

Instantly share code, notes, and snippets.

View danielsitnik's full-sized avatar
🤘
Somewhere in time

Daniel Sitnik danielsitnik

🤘
Somewhere in time
View GitHub Profile
@bhatikuldeep
bhatikuldeep / setMessageLogging.xml
Created February 26, 2019 13:52
Apigee Edge - Extensive logging
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="setMessageLogging">
<DisplayName>setMessageLogging</DisplayName>
<Syslog>
<Message variablePrefix="%" variableSuffix="#">[customerToken@41058 tag="%organization.name#.%apiproxy.name#.%environment.name#"] {
"apiproxy": {
"name": "%apiproxy.name#",
"revision": "%apiproxy.revision#"
},
"application": {
@bhatikuldeep
bhatikuldeep / setMessageLogging.xml
Created February 26, 2019 08:30
Message Logging Policy Configuration - Apigee Edge + ELK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="setMessageLogging">
<DisplayName>setMessageLogging</DisplayName>
<Syslog>
<!-- add logstash IP or host withhout HTTP scheme-->
<Host>{LOGSTASH_IP_OR_HOST}</Host>
<!-- make sure the JSON message is whitespaced free, workaround to parse JSON properly at logstash side-->
<Message variablePrefix="%" variableSuffix="#">{"systemTimeStamp":"%system.time.year#-%system.time.month#-%system.time.day#T%system.time.hour#:%system.time.minute#:%system.time.second#.%system.time.millisecond#Z","messageId":"%messageid#","statusCode":"%message.status.code#","contentType":"%request.header.Content-Type#","contentLength":"%client.received.content.length#","uri":"%request.uri#","path":"%request.path#","verb":"%request.verb#","meta":{"organization":"%organization.name#","product":"%apigee.apiproduct.name#","application":"%apigee.developer.app.name#","env ":"%enviro
@xandkar
xandkar / TOTP.java
Created June 29, 2015 02:22
TOTP reference implementation from RFC 6238
/**
Copyright (c) 2011 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, is permitted pursuant to, and subject to the license
terms contained in, the Simplified BSD License set forth in Section
4.c of the IETF Trust's Legal Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info).
*/