all: get rid of individual requirements file, remove version from every module

This commit is contained in:
Langhammer, Jens 2019-07-22 15:20:17 +02:00
parent 17575ed921
commit 174472bb45
28 changed files with 88 additions and 72 deletions

View File

@ -1,2 +0,0 @@
"""passbook admin"""
__version__ = '0.2.6-beta'

View File

@ -1,2 +0,0 @@
django-rest-framework
drf_yasg

View File

@ -1,2 +0,0 @@
"""passbook api"""
__version__ = '0.2.6-beta'

View File

@ -1,3 +0,0 @@
djangorestframework==3.9.4
drf_yasg
django-filters

View File

@ -1,2 +0,0 @@
"""passbook Application Security Gateway Header"""
__version__ = '0.2.6-beta'

View File

@ -1,7 +0,0 @@
django-revproxy
urllib3[secure]
channels
service_identity
websocket-client
daphne<2.3.0
asgiref~=2.3

View File

@ -1,2 +0,0 @@
"""passbook audit Header"""
__version__ = '0.2.6-beta'

View File

@ -1,2 +0,0 @@
"""passbook captcha_factor Header"""
__version__ = '0.2.6-beta'

View File

@ -1 +0,0 @@
django-recaptcha

66
passbook/core/nginx.conf Normal file
View File

@ -0,0 +1,66 @@
user nginx;
worker_processes 1;
error_log stderr warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format json_combined escape=json
'{'
'"time_local":"$time_local",'
'"remote_addr":"$remote_addr",'
'"remote_user":"$remote_user",'
'"request":"$request",'
'"status": "$status",'
'"body_bytes_sent":"$body_bytes_sent",'
'"request_time":"$request_time",'
'"http_referrer":"$http_referer",'
'"http_user_agent":"$http_user_agent"'
'}';
access_log /dev/stdout json_combined;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
server {
server_name _;
gzip on;
gzip_types application/javascript image/* text/css;
gunzip on;
add_header X-passbook-Version 0.2.6-beta;
add_header Vary X-passbook-Version;
root /static/;
location /_/healthz {
return 204;
}
location ~* \.(jpg|jpeg|png|gif|ico)$ {
expires 30d;
}
location ~* \.(css|js)$ {
expires 7d;
}
}
server {
listen 8080;
location = /stub_status {
stub_status;
}
}
}

View File

@ -1,2 +0,0 @@
"""passbook hibp_policy"""
__version__ = '0.2.6-beta'

View File

@ -1,2 +0,0 @@
"""Passbook ldap app Header"""
__version__ = '0.2.6-beta'

View File

@ -1 +0,0 @@
ldap3

View File

@ -1,2 +0,0 @@
"""passbook lib"""
__version__ = '0.2.6-beta'

View File

@ -1,2 +0,0 @@
"""passbook oauth_client Header"""
__version__ = '0.2.6-beta'

View File

@ -1,2 +0,0 @@
requests_oauthlib>=0.4.2
oauthlib>=2.0.6

View File

@ -1,2 +0,0 @@
"""passbook oauth_provider Header"""
__version__ = '0.2.6-beta'

View File

@ -1,2 +0,0 @@
django-oauth-toolkit
django-cors-middleware

View File

@ -0,0 +1,17 @@
# Generated by Django 2.2.3 on 2019-07-09 14:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('passbook_oidc_provider', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='openidprovider',
options={'verbose_name': 'OpenID Provider', 'verbose_name_plural': 'OpenID Providers'},
),
]

View File

@ -1 +0,0 @@
django-oidc-provider

View File

@ -1,2 +0,0 @@
"""passbook otp Header"""
__version__ = '0.2.6-beta'

View File

@ -1,2 +0,0 @@
django_otp
qrcode

View File

@ -1,2 +0,0 @@
"""passbook password_expiry"""
__version__ = '0.2.6-beta'

View File

@ -1,15 +0,0 @@
celery
colorlog
cherrypy
django-ipware
django-model-utils
django-redis
django>=2.0
djangorestframework
idna<2.8,>=2.5
markdown
psycopg2
PyYAML
sentry-sdk
pip
urllib3<1.25,>=1.21.1

View File

@ -1,2 +0,0 @@
"""passbook saml_idp Header"""
__version__ = '0.2.6-beta'

View File

@ -1,5 +0,0 @@
beautifulsoup4>=4.6.0
lxml>=3.8.0
signxml
defusedxml
PyCryptodome

View File

@ -1,2 +0,0 @@
"""passbook suspicious_policy"""
__version__ = '0.2.6-beta'

View File

@ -13,9 +13,11 @@ LOGGER = getLogger(__name__)
def update_score(request, username, amount): def update_score(request, username, amount):
"""Update score for IP and User""" """Update score for IP and User"""
remote_ip, _ = get_client_ip(request) remote_ip = '255.255.255.255'
if not remote_ip: if 'ip' in request:
remote_ip = '255.255.255.255' remote_ip = request['ip']
elif request:
remote_ip, _ = get_client_ip(request)
ip_score, _ = IPScore.objects.update_or_create(ip=remote_ip) ip_score, _ = IPScore.objects.update_or_create(ip=remote_ip)
ip_score.score += amount ip_score.score += amount
ip_score.save() ip_score.save()