Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Commit

Permalink
Release v0.8.0 (#458) The OA
Browse files Browse the repository at this point in the history
Release v0.8.0.  My name's not Prarie.
  • Loading branch information
Patrick Kelley committed Jan 13, 2017
2 parents eefef7a + 3d0e1d5 commit 870e18b
Show file tree
Hide file tree
Showing 130 changed files with 5,628 additions and 1,307 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[report]
include = security_monkey/*.py

8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.git
secmonkey.env
boto.cfg
.travis.yml
#docs
supervisor
config-default.py
generate-docs.py
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,8 @@ devlog/
venv/
.idea/

boto.cfg
secmonkey.env
*.crt
*.key

16 changes: 13 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sudo: false
sudo: required

language: python

Expand All @@ -20,18 +20,28 @@ env:

install:

before_install:
# - sudo apt-get -qq update
# - sudo apt-get install -y libxml2-dev libxmlsec1-dev

before_script:
- psql -c "CREATE DATABASE securitymonkeydb;" -U postgres
- psql -c "CREATE ROLE securitymonkeyuser LOGIN PASSWORD 'securitymonkeypass';" -U postgres
- psql -c "CREATE SCHEMA securitymonkeydb GRANT Usage, Create ON SCHEMA securitymonkeydb TO securitymonkeyuser;" -U postgres
- psql -c "set timezone TO 'GMT';" -U postgres
- python setup.py develop
- pip install .[tests]
- pip install coveralls
- python manage.py db upgrade

script:
- sh env_tests/test_dart.sh
- py.test security_monkey/tests || exit 1
- coverage run -m py.test security_monkey/tests || exit 1

after_success:
- coveralls

notifications:
email:
mgrima@netflix.com
- mgrima@netflix.com
- pkelley@netflix.com
46 changes: 46 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

# Copyright 2014 Netflix, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM ubuntu:14.04
MAINTAINER Netflix Open Source Development <talent@netflix.com>

ENV SECURITY_MONKEY_VERSION=v0.8.0 \
SECURITY_MONKEY_SETTINGS=/usr/local/src/security_monkey/env-config/config-docker.py

RUN apt-get update &&\
apt-get -y -q install python-software-properties software-properties-common postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 curl &&\
apt-get install -y python-pip python-dev python-psycopg2 libffi-dev libpq-dev libyaml-dev libxml2-dev libxmlsec1-dev git sudo swig &&\
rm -rf /var/lib/apt/lists/*

RUN pip install setuptools --upgrade

RUN cd /usr/local/src &&\
# git clone --branch $SECURITY_MONKEY_VERSION https://github.com/Netflix/security_monkey.git
/bin/mkdir -p security_monkey
ADD . /usr/local/src/security_monkey

RUN cd /usr/local/src/security_monkey &&\
python setup.py install &&\
/bin/mkdir -p /var/log/security_monkey/

RUN chmod +x /usr/local/src/security_monkey/docker/*.sh &&\
mkdir -pv /var/log/security_monkey &&\
/usr/bin/touch /var/log/security_monkey/securitymonkey.log
# ln -s /dev/stdout /var/log/security_monkey/securitymonkey.log

WORKDIR /usr/local/src/security_monkey
EXPOSE 5000

ENTRYPOINT ["/usr/local/src/security_monkey/docker/api-start.sh"]
32 changes: 24 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
.. image:: https://badge.waffle.io/Netflix/security_monkey.png?label=ready&title=Ready
:target: https://waffle.io/Netflix/security_monkey
:alt: 'Stories in Ready'
:target: https://waffle.io/Netflix/security_monkey
:alt: 'Stories in Ready'

.. image:: https://badges.gitter.im/Join%20Chat.svg
:alt: Join the chat at https://gitter.im/Netflix/security_monkey
:target: https://gitter.im/Netflix/security_monkey?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

**develop branch**:

.. image:: https://travis-ci.org/Netflix/security_monkey.svg?branch=develop
:target: https://travis-ci.org/Netflix/security_monkey

.. image:: https://coveralls.io/repos/github/Netflix/security_monkey/badge.svg?branch=develop
:target: https://coveralls.io/github/Netflix/security_monkey

**master branch**:

.. image:: https://travis-ci.org/Netflix/security_monkey.svg?branch=master
:target: https://travis-ci.org/Netflix/security_monkey

.. image:: https://coveralls.io/repos/github/Netflix/security_monkey/badge.svg?branch=master
:target: https://coveralls.io/github/Netflix/security_monkey


***************
Security Monkey
***************
Expand All @@ -16,9 +38,3 @@ Project resources
- `Documentation <http://securitymonkey.readthedocs.org/>`_
- `Source code <https://github.com/netflix/security_monkey>`_
- `Issue tracker <https://github.com/netflix/security_monkey/issues>`_



.. image:: https://badges.gitter.im/Join%20Chat.svg
:alt: Join the chat at https://gitter.im/Netflix/security_monkey
:target: https://gitter.im/Netflix/security_monkey?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,33 @@ class AccountViewComponent implements ScopeAware {
Account account;
bool create = false;
bool _as_loaded = false;
bool _cfg_loaded = false;
bool _is_error = false;
String err_message = "";
AccountConfig config;
ObjectStore store;

AccountViewComponent(this.routeProvider, this.router, this.store) {
this.store = store;
// If the URL has an ID, then let's view/edit
if (routeProvider.parameters.containsKey("accountid")) {
store.one(Account, routeProvider.parameters['accountid']).then((Account account) {
store.one(Account, routeProvider.parameters['accountid']).then((account) {
this.account = account;
_as_loaded = true;
this._as_loaded = true;
});
store.one(AccountConfig, "all").then((account_config) {
this.config = account_config;
_cfg_loaded = true;
});
create = false;
} else {
// If the URL does not have an ID, then let's create
account = new Account();
this.account = new Account();
store.one(AccountConfig, "all").then((account_config) {
this.config = account_config;
_cfg_loaded = true;
});
_as_loaded = true;
create = true;
}
}
Expand All @@ -36,7 +47,7 @@ class AccountViewComponent implements ScopeAware {
scope.on("globalAlert").listen(this._showMessage);
}

get isLoaded => create || _as_loaded;
get isLoaded => _as_loaded && _cfg_loaded;
get isError => _is_error;

void _showMessage(ScopeEvent event) {
Expand All @@ -53,7 +64,9 @@ class AccountViewComponent implements ScopeAware {
});
});
} else {
this.store.update(this.account);
this.store.update(this.account).then((_) {
window.location.reload();
});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,29 @@ <h1 ng-if="create" class="page-header">Create Account</h1>
</div>
</div>
<div class="form-group">
<label for="S3Name" class="col-sm-2 control-label" tooltip-placement="right" tooltip="The S3 Name is the way AWS presents the account in an ACL policy. This is often times the first part of the email address that was used to create the Amazon account. (myaccount@example.com may be represented as myaccount). If you see S3 issues appear for unknown cross account access, you may need to update the S3 Name. (Up to 64 characters).">
S3 Name
<label for="Type" class="col-sm-2 control-label" tooltip-placement="right" tooltip="The type of account, for example AWS (default).">
Type
</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="S3Name" placeholder="S3 Name" ng-model="account.s3_name" maxlength="64"
tooltip-placement="left" tooltip="The S3 Name is the way AWS presents the account in an ACL policy. This is often times the first part of the email address that was used to create the Amazon account. (myaccount@example.com may be represented as myaccount). If you see S3 issues appear for unknown cross account access, you may need to update the S3 Name. (Up to 64 characters).">
<select id="AccountType" ng-model="account.account_type" class="form-control">
<option ng-repeat="option in config.account_types" value="{{ option }}">{{ option }}</option>
</select>
</div>
</div>
<div class="form-group">
<label for="AccountNumber" class="col-sm-2 control-label" tooltip-placement="right" tooltip="Enter the AWS account number, if you have it. (12 digits)">Number</label>
<label for="AccountIdentifier" class="col-sm-2 control-label" tooltip-placement="right" tooltip="{{ config.identifier_tool_tips[account.account_type]}}">{{ config.identifier_labels[account.account_type] }}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="AccountNumber" placeholder="Number" ng-model="account.number" maxlength="12"
tooltip-placement="left" tooltip="Enter the AWS account number, if you have it. (12 digits)">
<input type="text" class="form-control" id="AccountIdentifier" ng-model="account.identifier" maxlength="256"
tooltip-placement="left" tooltip="{{ config.identifier_tool_tips[account.account_type]}}">
</div>
</div>
<div class="form-group">
<label for="AccountRoleName" class="col-sm-2 control-label">Role name</label>
<div ng-repeat="custom_field in config.custom_fields[account.account_type]" class="form-group">
<label for="{{ custom_field.name }}" class="col-sm-2 control-label" tooltip-placement="right" tooltip="{{ custom_field.tool_tip }}">{{ custom_field.label }}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="AccountRoleName" placeholder="Role Name" ng-model="account.role_name" maxlength="256"
tooltip-placement="left" tooltip="Optional custom role name, otherwise the default 'SecurityMonkey' is used. When deploying roles via CloudFormation, this is the Physical ID of the generated IAM::ROLE. (Up to 256 characters).">
<input ng-if="!custom_field.password" type="text" class="form-control" id="{{ custom_field.name }}" ng-model="account.custom_field_values[custom_field.name]" ng-disabled="!custom_field.editable", maxlength="256"
tooltip-placement="left" tooltip="{{ custom_field.tool_tip}}">
<input ng-if="custom_field.password" type="password" class="form-control" id="{{ custom_field.name }}" ng-model="account.custom_field_values[custom_field.name]" ng-disabled="!custom_field.editable", maxlength="256"
tooltip-placement="left" tooltip="{{ custom_field.tool_tip}}">
</div>
</div>
<div class="form-group">
Expand Down Expand Up @@ -90,6 +93,7 @@ <h3 ng-if="create">Due to an open <a href="https://github.com/Netflix/security_m
securitymonkeyscheduler: started
supervisor>
</pre>

</form>
</div>
</div>
Expand Down
Loading

0 comments on commit 870e18b

Please sign in to comment.