logstash-input-centrifyidplatform 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +3 -0
- data/INSTRUCTIONS.md +70 -0
- data/LICENSE +11 -0
- data/README.md +88 -0
- data/lib/logstash/inputs/centrifyidplatform.rb +234 -0
- data/logstash-input-centrifyidplatform.gemspec +24 -0
- data/spec/inputs/centrifyidplatform_spec.rb +11 -0
- metadata +109 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fe10692c16ca44f5994687387030b1e5d86d3d71
|
4
|
+
data.tar.gz: bda9546b17d99d5027eb0b3971e79445a9df074e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8f1c60ffb65bdf23012f3f941094057417a3b2455d6bf471d9f34e157ea1474428107a3941cef4b9576d28dcc3d8daaac41cc845c659f4b5799dae108e35dc1a
|
7
|
+
data.tar.gz: 83cd60f040754239d739319dceaae5b960ad0b4e695f02fc37c5d2d1c3ef8428918b910559aaa6ab80d3cd794137de88c3c69b3b7aae454079f9b8c87833608b
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/INSTRUCTIONS.md
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
# Instructions
|
2
|
+
|
3
|
+
This document aims to provide more detail on how to implement the logstash-input-centrifyidplatform plugin.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
There are two methods of installing this plugin.
|
8
|
+
|
9
|
+
1. The plugin is published on rubygems.org (https://rubygems.org/gems/logstash-input-centrifyidplatform) so it can be easily installed via Logstash by using the following command:
|
10
|
+
|
11
|
+
`logstash-plugin install logstash-input-centrifyidplatform`
|
12
|
+
|
13
|
+
2. You can build and install the gem file locally by using the `Makefile` on your system. However, you will need to ensure Ruby requirements for building gem files are met. Use the following commands:
|
14
|
+
|
15
|
+
`make build`
|
16
|
+
|
17
|
+
This command will build and install the gem file. You will need to ensure the `logstash-plugin` command is in your PATH.
|
18
|
+
|
19
|
+
## Configuration
|
20
|
+
|
21
|
+
Refer to the example configuration file [here](logstash-input-centrifyidplatform.conf). The example file contains comments to explain each configuration option. This file assumes you will import the data into Elasticsearch using the logstash-output-elasticsearch plugin. However, you can certainly use any output plugin you like.
|
22
|
+
|
23
|
+
## Quick Start - Running the ELK stack locally
|
24
|
+
|
25
|
+
This section is optional. If you want to run a local ELK stack to run or test this plugin with, below are
|
26
|
+
basic instructions for installing ELK on Mac OS. These instructions use Homebrew to install all packages.
|
27
|
+
You can find lots of ELK documentation online, this section is just intended to be a helpful quick overivew/guide.
|
28
|
+
you can also refer to Elasticsearch's getting started page: https://www.elastic.co/start
|
29
|
+
|
30
|
+
1. The first requirement is Java 8, run:
|
31
|
+
|
32
|
+
```shell
|
33
|
+
brew update
|
34
|
+
brew tap caskroom/versions
|
35
|
+
brew cask install java8
|
36
|
+
```
|
37
|
+
|
38
|
+
Reference https://stackoverflow.com/questions/24342886/how-to-install-java-8-on-mac
|
39
|
+
|
40
|
+
2. Next install Elasticsearch, Logstash, and Kibana, run:
|
41
|
+
|
42
|
+
```shell
|
43
|
+
brew install elasticsearch
|
44
|
+
brew install logstash
|
45
|
+
brew install kibana
|
46
|
+
```
|
47
|
+
|
48
|
+
With brew you can start/stop these services by running:
|
49
|
+
|
50
|
+
```shell
|
51
|
+
brew services start elasticsearch
|
52
|
+
brew services start logstash
|
53
|
+
brew services start kibana
|
54
|
+
|
55
|
+
brew services stop elasticsearch
|
56
|
+
brew services stop logstash
|
57
|
+
brew services stop kibana
|
58
|
+
```
|
59
|
+
|
60
|
+
## Quick Start - Developing logstash plugins
|
61
|
+
|
62
|
+
This section references to help you get started with logstash plugin development.
|
63
|
+
|
64
|
+
1. The article [So, You Want to Make a Logstash Plugin...](https://dzone.com/articles/so-you-want-to-make-a-logstash-plugin) is a great first step. It outlines installing Ruby requirements and setting up the Ruby environment. With this setup you can start developing on the logstash-input-centrifyidplatform plugin, or any other plugin.
|
65
|
+
|
66
|
+
If you want to create a new plugin, see:
|
67
|
+
|
68
|
+
1. Plugin generator https://www.elastic.co/guide/en/logstash/current/plugins-inputs-generator.html, usage: https://github.com/elastic/logstash/blob/master/docs/static/plugin-generator.asciidoc
|
69
|
+
|
70
|
+
2. Submitting your plugin to [RubyGems.org and the Logstash-plugin repository](https://www.elastic.co/guide/en/logstash/current/submitting-plugin.html).
|
data/LICENSE
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
2
|
+
you may not use this file except in compliance with the License.
|
3
|
+
You may obtain a copy of the License at
|
4
|
+
|
5
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
|
7
|
+
Unless required by applicable law or agreed to in writing, software
|
8
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
See the License for the specific language governing permissions and
|
11
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
# Logstash Input Plugin for Centrify Identity Platform
|
2
|
+
|
3
|
+
For more detail on using the Centrify Identity Platform logstash plugin, see [instructions](INSTRUCTIONS.md).
|
4
|
+
|
5
|
+
This is a plugin for [Logstash](https://github.com/elastic/logstash).
|
6
|
+
|
7
|
+
It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
|
8
|
+
|
9
|
+
## Documentation
|
10
|
+
|
11
|
+
Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elastic.co/guide/en/logstash/current/).
|
12
|
+
|
13
|
+
- For formatting code or config example, you can use the asciidoc `[source,ruby]` directive
|
14
|
+
- For more asciidoc formatting tips, see the excellent reference here https://github.com/elastic/docs#asciidoc-guide
|
15
|
+
|
16
|
+
## Need Help?
|
17
|
+
|
18
|
+
Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/logstash discussion forum.
|
19
|
+
|
20
|
+
## Developing
|
21
|
+
|
22
|
+
### 1. Plugin Developement and Testing
|
23
|
+
|
24
|
+
#### Code
|
25
|
+
- To get started, you'll need JRuby with the Bundler gem installed.
|
26
|
+
|
27
|
+
- Create a new plugin or clone and existing from the GitHub [logstash-plugins](https://github.com/logstash-plugins) organization. We also provide [example plugins](https://github.com/logstash-plugins?query=example).
|
28
|
+
|
29
|
+
- Install dependencies
|
30
|
+
```sh
|
31
|
+
bundle install
|
32
|
+
```
|
33
|
+
|
34
|
+
#### Test
|
35
|
+
|
36
|
+
- Update your dependencies
|
37
|
+
|
38
|
+
```sh
|
39
|
+
bundle install
|
40
|
+
```
|
41
|
+
|
42
|
+
- Run tests
|
43
|
+
|
44
|
+
```sh
|
45
|
+
bundle exec rspec
|
46
|
+
```
|
47
|
+
|
48
|
+
### 2. Running your unpublished Plugin in Logstash
|
49
|
+
|
50
|
+
#### 2.1 Run in a local Logstash clone
|
51
|
+
|
52
|
+
- Edit Logstash `Gemfile` and add the local plugin path, for example:
|
53
|
+
```ruby
|
54
|
+
gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
|
55
|
+
```
|
56
|
+
- Install plugin
|
57
|
+
```sh
|
58
|
+
bin/logstash-plugin install --no-verify
|
59
|
+
```
|
60
|
+
- Run Logstash with your plugin
|
61
|
+
```sh
|
62
|
+
bin/logstash -e 'filter {awesome {}}'
|
63
|
+
```
|
64
|
+
At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash.
|
65
|
+
|
66
|
+
#### 2.2 Run in an installed Logstash
|
67
|
+
|
68
|
+
You can use the same **2.1** method to run your plugin in an installed Logstash by editing its `Gemfile` and pointing the `:path` to your local plugin development directory or you can build the gem and install it using:
|
69
|
+
|
70
|
+
- Build your plugin gem
|
71
|
+
```sh
|
72
|
+
gem build logstash-filter-awesome.gemspec
|
73
|
+
```
|
74
|
+
- Install the plugin from the Logstash home
|
75
|
+
```sh
|
76
|
+
bin/logstash-plugin install /your/local/plugin/logstash-filter-awesome.gem
|
77
|
+
```
|
78
|
+
- Start Logstash and proceed to test the plugin
|
79
|
+
|
80
|
+
## Contributing
|
81
|
+
|
82
|
+
All contributions are welcome: ideas, patches, documentation, bug reports, complaints, and even something you drew up on a napkin.
|
83
|
+
|
84
|
+
Programming is not a required skill. Whatever you've seen about open source and maintainers or community members saying "send patches or die" - you will not see that here.
|
85
|
+
|
86
|
+
It is more important to the community that you are able to contribute.
|
87
|
+
|
88
|
+
For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
|
@@ -0,0 +1,234 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require "logstash/inputs/base"
|
3
|
+
require "logstash/namespace"
|
4
|
+
require "stud/interval"
|
5
|
+
require "socket" # for Socket.gethostname
|
6
|
+
require "json"
|
7
|
+
require "date"
|
8
|
+
require "base64"
|
9
|
+
|
10
|
+
# Fetch Centrify Identity Platform request data.
|
11
|
+
#
|
12
|
+
|
13
|
+
class LogStash::Inputs::Centrifyidplatform < LogStash::Inputs::Base
|
14
|
+
config_name "centrifyidplatform"
|
15
|
+
|
16
|
+
# If undefined, Logstash will complain, even if codec is unused.
|
17
|
+
default :codec, "json"
|
18
|
+
|
19
|
+
#query = 'Select * from Event where WhenOccurred >= start_time_string and WhenOccurred < end_time_string ORDER BY WhenOccurred ASC'
|
20
|
+
|
21
|
+
# Configurable variables
|
22
|
+
# Centrify PAS OAuth2 account username.
|
23
|
+
config :username, :validate => :string, :default => ""
|
24
|
+
# Centrify OAuth2 password.
|
25
|
+
config :password, :validate => :string, :default => ""
|
26
|
+
# Centrify Tenant.
|
27
|
+
config :tenant, :validate => :string, :default => "not_provided"
|
28
|
+
# Centrify OAuth2 client path
|
29
|
+
config :oauthclient, :validate => :string, :default => "not_provided"
|
30
|
+
config :debug, :validate => :boolean, :default => false
|
31
|
+
# Scope defined within Oauthclient
|
32
|
+
config :scope, :validate => :string, :default => "siem"
|
33
|
+
# Previous timeframe to query from in hours integer
|
34
|
+
config :historyhrs, :validate => :number, :default => 24
|
35
|
+
# Search previoushrs true or false
|
36
|
+
config :historysearch, :validate => :boolean, :default => false
|
37
|
+
|
38
|
+
public
|
39
|
+
def register
|
40
|
+
@host = Socket.gethostname.force_encoding(Encoding::UTF_8)
|
41
|
+
|
42
|
+
@logger.info("Registering Centrify Identify Platform Input", :tenant => @tenant, :username => @username, :password => @password, :oauthclient => @oauthclient, :scope => @scope, :historyhrs => @historyhrs, :historysearch => @historysearch )
|
43
|
+
@http = Net::HTTP.new(@tenant, 443)
|
44
|
+
@http.use_ssl = true
|
45
|
+
@http.set_debug_output($stdout) if @debug
|
46
|
+
# set version for UA string
|
47
|
+
@version = "1.0.0"
|
48
|
+
@token_endpoint = "/oauth2/token/#{@oauthclient}/"
|
49
|
+
@query_endpoint = "/Redrock/query"
|
50
|
+
# set interval to value of from @from minus five minutes
|
51
|
+
@interval = 300
|
52
|
+
if historysearch
|
53
|
+
@from = @historyhrs * 3600
|
54
|
+
else
|
55
|
+
@from = 300
|
56
|
+
end
|
57
|
+
t = Time.now.utc.strftime("%Y-%m-%dT%H:%M:%S.%zZ")
|
58
|
+
dt = DateTime.parse(t)
|
59
|
+
ts_until = Time.at(dt.to_time.to_i - 300) # now - 5 minutes
|
60
|
+
ts_from = Time.at(ts_until - @from) # @until - @from
|
61
|
+
@timestamp_until = ts_until.strftime("%Y-%m-%d %H:%M:%S%z")
|
62
|
+
@timestamp_from = ts_from.strftime("%Y-%m-%d %H:%M:%S%z")
|
63
|
+
@eventquery = "select * from Event where WhenOccurred between datefunc('#{@timestamp_from}') and datefunc('#{@timestamp_until}') ORDER BY WhenOccurred ASC"
|
64
|
+
end
|
65
|
+
|
66
|
+
public
|
67
|
+
def run(queue)
|
68
|
+
while !stop?
|
69
|
+
if fetch(queue)
|
70
|
+
@logger.debug("Centrify Identity Platform requests feed retreived successfully.")
|
71
|
+
else
|
72
|
+
@logger.warn("Centrify Identity Platform problem retreiving request!")
|
73
|
+
end
|
74
|
+
@logger.debug("Centrify Identity Platform Sleep: #{@interval}")
|
75
|
+
@timestamp_from = @timestamp_until
|
76
|
+
Stud.stoppable_sleep(@interval) { stop? }
|
77
|
+
t = Time.now.utc.strftime("%Y-%m-%dT%H:%M:%S.%zZ")
|
78
|
+
dt = DateTime.parse(t)
|
79
|
+
ts_until = Time.at(dt.to_time.to_i - 300) # now - 5 minutes
|
80
|
+
@timestamp_until = ts_until.strftime("%Y-%m-%d %H:%M:%S%z")
|
81
|
+
@eventquery = "select * from Event where WhenOccurred between datefunc('#{@timestamp_from}') and datefunc('#{@timestamp_until}') ORDER BY WhenOccurred ASC"
|
82
|
+
end #end loop
|
83
|
+
end
|
84
|
+
|
85
|
+
def fetch(queue)
|
86
|
+
@logger.debug("Centrify Identity Platform tenant: #{@name}")
|
87
|
+
@logger.debug("Centrify Identity Platform OAuth endpoint: #{@oauthclient}")
|
88
|
+
bearer_token = setup_auth_requests!
|
89
|
+
request = post_request(queue, bearer_token)
|
90
|
+
response = @http.request(request)
|
91
|
+
if response.code == "200"
|
92
|
+
body = response.body
|
93
|
+
if body && body.size > 0
|
94
|
+
json = JSON.load(body)
|
95
|
+
if json.has_key? "success"
|
96
|
+
_success = json['success']
|
97
|
+
@logger.debug("Centrify Identity Platform Query success: #{_success}")
|
98
|
+
if _success == 'false'
|
99
|
+
_message = json['message']
|
100
|
+
_exception = json['exception']
|
101
|
+
@logger.warn("Centrify Identity Platform exception: #{_exception} message: #{_message}")
|
102
|
+
return
|
103
|
+
end
|
104
|
+
_events = json['Result']['Results']
|
105
|
+
_events.each do |child|
|
106
|
+
if child.is_a?(Hash)
|
107
|
+
temp = {}
|
108
|
+
_row = child['Row']
|
109
|
+
temp = _row.delete_if { |k, v| v.nil? }
|
110
|
+
_row = temp
|
111
|
+
_whenlogged = date_fix!(_row['WhenLogged'])
|
112
|
+
@logger.debug("Centrify Identity Platform Query whenlogged date fix: #{_whenlogged}")
|
113
|
+
_row['WhenLogged'] = _whenlogged
|
114
|
+
_whenoccurred = date_fix!(_row['WhenOccurred'])
|
115
|
+
@logger.debug("Centrify Identity Platform Query whenlogged date fix: #{_whenoccurred}")
|
116
|
+
_row['WhenOccurred'] = _whenoccurred
|
117
|
+
|
118
|
+
@logger.debug("Centrify Identity Platform Query JSON dump Row: #{_row}")
|
119
|
+
process_payload!(_row, queue)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
#handle_success!(queue, event_results)
|
125
|
+
else
|
126
|
+
@logger.warn("Centrify Identity Platform post exception: #{response.code}")
|
127
|
+
check_response_code!(response.code, "Post Exception")
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
private
|
132
|
+
def post_request(queue, bearer_token)
|
133
|
+
post = Net::HTTP::Post.new("#{@query_endpoint}")
|
134
|
+
post["Authorization"] = "Bearer #{bearer_token}"
|
135
|
+
post.body = JSON.generate({:Script => @eventquery})
|
136
|
+
post['User-Agent'] = "logstash-centrifyidplatform/#{@version}"
|
137
|
+
@logger.debug("Requesting query data: #{JSON.generate({:Script => @eventquery})}")
|
138
|
+
return post
|
139
|
+
end
|
140
|
+
|
141
|
+
private
|
142
|
+
def handle_success!(queue, event_results)
|
143
|
+
event_results['Row'].each do |payload|
|
144
|
+
@logger.debug("event_result: #{payload}")
|
145
|
+
process_payload!(payload, queue)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
private
|
150
|
+
def setup_auth_requests!
|
151
|
+
login = Net::HTTP::Post.new(@token_endpoint)
|
152
|
+
login['User-Agent'] = "logstash-centrifyidplatform/#{@version}"
|
153
|
+
login['Content-Type'] = "application/x-www-form-urlencoded"
|
154
|
+
credentials = Base64.strict_encode64 ("#{@username}:#{@password}")
|
155
|
+
@logger.debug("Centrify Identity Platform login credentials: Basic #{credentials}")
|
156
|
+
login["Authorization"] = "Basic #{credentials}"
|
157
|
+
login.body = "grant_type=client_credentials&scope=#{@scope}"
|
158
|
+
|
159
|
+
begin
|
160
|
+
loginresponse = @http.request(login)
|
161
|
+
@logger.debug("Centrify Identity Platform login response: #{loginresponse.code}")
|
162
|
+
rescue
|
163
|
+
@logger.warn("Centrify Identity Platform could not reach API endpoint to login!")
|
164
|
+
return false
|
165
|
+
end
|
166
|
+
if loginresponse.code != "200"
|
167
|
+
return check_response_code!(loginresponse.code, "Auth")
|
168
|
+
end
|
169
|
+
json = JSON.parse(loginresponse.body)
|
170
|
+
if json.has_key? "message"
|
171
|
+
# failed to login
|
172
|
+
@logger.warn("Centrify Identity Platform login failed: #{json['message']}")
|
173
|
+
return false
|
174
|
+
end
|
175
|
+
bearer_token = json['access_token']
|
176
|
+
@logger.debug("Centrify Identity Platform Bearer Token: #{bearer_token}")
|
177
|
+
return bearer_token
|
178
|
+
end
|
179
|
+
|
180
|
+
private
|
181
|
+
def check_response_code!(res_code, message)
|
182
|
+
if res_code == "524"
|
183
|
+
@logger.warn("524 - Origin Timeout!")
|
184
|
+
@logger.info("Another attempt will be made later. #{message}")
|
185
|
+
return false
|
186
|
+
end
|
187
|
+
if res_code == "429"
|
188
|
+
@logger.warn("429 - Too Many Requests!")
|
189
|
+
@logger.info("API request throttling as been triggered, another attempt will be made later. Contact support if this error continues. #{message}")
|
190
|
+
return false
|
191
|
+
end
|
192
|
+
if res_code == "404"
|
193
|
+
@logger.warn("404 - Not Found! #{message}")
|
194
|
+
return false
|
195
|
+
end
|
196
|
+
if res_code == "401"
|
197
|
+
@logger.warn("401 - Unauthorized! #{message}")
|
198
|
+
return false
|
199
|
+
end
|
200
|
+
@logger.warn("Non-200 return enable debug to troubleshoot: #{res_code} #{message}")
|
201
|
+
return false
|
202
|
+
end
|
203
|
+
|
204
|
+
private
|
205
|
+
def date_fix!(when_str)
|
206
|
+
prefix = '/Date('
|
207
|
+
suffix = ')/'
|
208
|
+
when_str = when_str.delete_prefix(prefix)
|
209
|
+
when_str = when_str.delete_suffix(suffix).to_f
|
210
|
+
when_str = when_str / 1000.0
|
211
|
+
when_str = Time.at(when_str).utc
|
212
|
+
when_str = when_str.strftime("%Y-%m-%dT%H:%M:%S.%3NZ")
|
213
|
+
return when_str
|
214
|
+
end
|
215
|
+
|
216
|
+
private
|
217
|
+
def process_payload!(payload, queue)
|
218
|
+
temp = {}
|
219
|
+
payload['logstash_host.name'] = @host
|
220
|
+
|
221
|
+
event = LogStash::Event.new('message' => payload.to_json, 'host' => @host, '@timestamp' => payload['WhenOccurred'])
|
222
|
+
event.tag('centrifyidplatform')
|
223
|
+
decorate(event)
|
224
|
+
queue << event
|
225
|
+
end
|
226
|
+
#
|
227
|
+
# def stop
|
228
|
+
# # nothing to do in this case so it is not necessary to define stop
|
229
|
+
# # examples of common "stop" tasks:
|
230
|
+
# # * close sockets (unblocking blocking reads/accepts)
|
231
|
+
# # * cleanup temporary files
|
232
|
+
# # * terminate spawned threads
|
233
|
+
# end
|
234
|
+
end # class LogStash::Inputs::Centrifyidplatform
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'logstash-input-centrifyidplatform'
|
3
|
+
s.version = '1.0.0'
|
4
|
+
s.licenses = ['Apache-2.0']
|
5
|
+
s.summary = 'Logstash input plugin for Centrify Identity Platform.'
|
6
|
+
s.description = 'Logstash input plugin for the Centrify Identity Platform RedRock/query feed endpoint https://developer.centrify.com/reference'
|
7
|
+
s.homepage = 'https://github.com/r32rtb'
|
8
|
+
s.authors = ['r32rtb']
|
9
|
+
s.email = 'r32rtb@users.noreply.github.com'
|
10
|
+
s.require_paths = ['lib']
|
11
|
+
|
12
|
+
# Files
|
13
|
+
s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
|
14
|
+
# Tests
|
15
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
16
|
+
|
17
|
+
# Special flag to let us know this is actually a logstash plugin
|
18
|
+
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }
|
19
|
+
|
20
|
+
# Gem dependencies
|
21
|
+
s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
|
22
|
+
s.add_runtime_dependency 'stud', '~> 0.0', '>= 0.0.22'
|
23
|
+
s.add_development_dependency 'logstash-devutils', '~> 0.0', '>= 0.0.16'
|
24
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require "logstash/devutils/rspec/spec_helper"
|
3
|
+
require "logstash/inputs/centrifyidplatform"
|
4
|
+
|
5
|
+
describe LogStash::Inputs::centrifyidplatform do
|
6
|
+
|
7
|
+
it_behaves_like "an interruptible input plugin" do
|
8
|
+
let(:config) { { "interval" => 600 } }
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
metadata
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: logstash-input-centrifyidplatform
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- r32rtb
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-04-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '2.0'
|
19
|
+
name: logstash-core-plugin-api
|
20
|
+
prerelease: false
|
21
|
+
type: :runtime
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0.0'
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 0.0.22
|
36
|
+
name: stud
|
37
|
+
prerelease: false
|
38
|
+
type: :runtime
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0.0'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.0.22
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0.0'
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.0.16
|
56
|
+
name: logstash-devutils
|
57
|
+
prerelease: false
|
58
|
+
type: :development
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0.0'
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 0.0.16
|
67
|
+
description: Logstash input plugin for the Centrify Identity Platform RedRock/query
|
68
|
+
feed endpoint https://developer.centrify.com/reference
|
69
|
+
email: r32rtb@users.noreply.github.com
|
70
|
+
executables: []
|
71
|
+
extensions: []
|
72
|
+
extra_rdoc_files: []
|
73
|
+
files:
|
74
|
+
- CHANGELOG.md
|
75
|
+
- Gemfile
|
76
|
+
- INSTRUCTIONS.md
|
77
|
+
- LICENSE
|
78
|
+
- README.md
|
79
|
+
- lib/logstash/inputs/centrifyidplatform.rb
|
80
|
+
- logstash-input-centrifyidplatform.gemspec
|
81
|
+
- spec/inputs/centrifyidplatform_spec.rb
|
82
|
+
homepage: https://github.com/r32rtb
|
83
|
+
licenses:
|
84
|
+
- Apache-2.0
|
85
|
+
metadata:
|
86
|
+
logstash_plugin: 'true'
|
87
|
+
logstash_group: input
|
88
|
+
post_install_message:
|
89
|
+
rdoc_options: []
|
90
|
+
require_paths:
|
91
|
+
- lib
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
requirements: []
|
103
|
+
rubyforge_project:
|
104
|
+
rubygems_version: 2.6.14.1
|
105
|
+
signing_key:
|
106
|
+
specification_version: 4
|
107
|
+
summary: Logstash input plugin for Centrify Identity Platform.
|
108
|
+
test_files:
|
109
|
+
- spec/inputs/centrifyidplatform_spec.rb
|