Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
update README, set versionns of library, remove unnused librarys and …
Browse files Browse the repository at this point in the history
…fix nginx conf
  • Loading branch information
raxonros committed Mar 7, 2023
1 parent 812b289 commit c8ee1b7
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 55 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,20 +244,20 @@ Changes at Services:
* Query and retrieve service API invocation logs stored on the CAPIF core function.


# CAPIF Tool Release 3.1

* Delete a service automatically if the provider that contains the APF that published it is deleted
* Clear the security context of an invoker automatically if the invoker is deleted
* Delete automatically the entry in the security info of the security context if the provider that has the aef that published the service is deleted
* Delete automatically the entry in the security info of the security context if the service on which that context was created is deleted

Changes at Tests:
* **New common scenarios** in order to make easy to describe a test.
* New Test plan definition format.
* Change to new provider registration towards provider Management.
* Complete code refactor of all tests
* Complete test plan review, including all services (except auditing and logging)

# CAPIF Tool Release 3.1

* Delete a service automatically if the provider that contains the APF that published it is deleted
* Clear the security context of an invoker automatically if the invoker is deleted
* Delete automatically the entry in the security info of the security context if the provider that has the aef that published the service is deleted
* Delete automatically the entry in the security info of the security context if the service on which that context was created is deleted




Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ python_dateutil >= 2.6.0
setuptools >= 21.0.0
Flask == 2.0.3
pymongo == 4.0.1
flask_jwt_extended
pyopenssl
rfc3987
redis
flask_executor
flask_jwt_extended == 4.4.4
pyopenssl == 23.0.0
rfc3987 == 1.3.8
redis == 4.5.1
flask_executor == 1.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ python_dateutil >= 2.6.0
setuptools >= 21.0.0
Flask == 2.0.3
pymongo == 4.0.1
redis
flask_jwt_extended
flask_executor
pyopenssl
redis == 4.5.1
flask_executor == 1.0.0
flask_jwt_extended == 4.4.4
pyopenssl == 23.0.0
rfc3987 == 1.3.8

5 changes: 2 additions & 3 deletions services/TS29222_CAPIF_Auditing_API/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ setuptools >= 21.0.0
Flask == 2.0.3
pymongo == 4.0.1
elasticsearch == 8.4.3
flask_jwt_extended
pyopenssl
flask-mqtt
flask_jwt_extended == 4.4.4
pyopenssl == 23.0.0
4 changes: 2 additions & 2 deletions services/TS29222_CAPIF_Discover_Service_API/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ python_dateutil >= 2.6.0
setuptools >= 21.0.0
Flask == 2.0.3
pymongo == 4.0.1
flask_jwt_extended
pyopenssl
flask_jwt_extended == 4.4.4
pyopenssl == 23.0.0
4 changes: 1 addition & 3 deletions services/TS29222_CAPIF_Events_API/capif_events/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from multiprocessing import Process
from threading import Thread
from flask_executor import Executor
from flask_apscheduler import APScheduler
from logging.handlers import RotatingFileHandler


Expand Down Expand Up @@ -61,8 +60,7 @@ def verbose_formatter():
configure_logging(app.app)
executor = Executor(app.app)
subscriber = Subscriber()
scheduler = APScheduler()
scheduler.init_app(app.app)


@app.app.before_first_request
def create_listener_message():
Expand Down
12 changes: 6 additions & 6 deletions services/TS29222_CAPIF_Events_API/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ python_dateutil >= 2.6.0
setuptools >= 21.0.0
Flask == 2.0.3
pymongo == 4.0.1
flask_jwt_extended
pyopenssl
rfc3987
redis
flask_executor
Flask-APScheduler
flask_jwt_extended == 4.4.4
pyopenssl == 23.0.0
rfc3987 == 1.3.8
redis == 4.5.1
flask_executor == 1.0.0

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ setuptools >= 21.0.0
Flask == 2.0.3
pymongo == 4.0.1
elasticsearch == 8.4.3
flask_jwt_extended
pyopenssl
flask-mqtt
flask_jwt_extended == 4.4.4
pyopenssl == 23.0.0

8 changes: 4 additions & 4 deletions services/TS29222_CAPIF_Publish_Service_API/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ python_dateutil >= 2.6.0
setuptools >= 21.0.0
Flask == 2.0.3
pymongo == 4.0.1
flask_jwt_extended
flask_executor
pyopenssl
redis
flask_jwt_extended == 4.4.4
pyopenssl == 23.0.0
redis == 4.5.1
flask_executor == 1.0.0

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from .core.consumer_messager import Subscriber
from threading import Thread
from flask_executor import Executor
from flask_apscheduler import APScheduler
from logging.handlers import RotatingFileHandler
import sys

Expand Down Expand Up @@ -56,8 +55,6 @@ def main():

JWTManager(app.app)
subscriber = Subscriber()
scheduler = APScheduler()
scheduler.init_app(app.app)
configure_logging(app.app)

executor = Executor(app.app)
Expand Down
12 changes: 5 additions & 7 deletions services/TS29222_CAPIF_Security_API/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ python_dateutil >= 2.6.0
setuptools >= 21.0.0
Flask == 2.0.3
pymongo == 4.0.1
flask_jwt_extended
pyjwt
rfc3987
redis
pyopenssl
flask_executor
Flask-APScheduler
flask_jwt_extended == 4.4.4
pyopenssl == 23.0.0
rfc3987 == 1.3.8
redis == 4.5.1
flask_executor == 1.0.0
16 changes: 8 additions & 8 deletions services/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ http {
}
map "$request_method:$uri:$ssl_client_s_dn_cn" $invoker_error_message {
default 'SUCCESS';
"~*(PUT|DELETE):.*:(?!(invoker))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}';
"~*(PUT|DELETE):.*:(?!invoker)(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}';
}
map "$request_method:$uri:$ssl_client_s_dn_cn" $provider_error_message {
default 'SUCCESS';
"~*(PUT|DELETE|PATCH):.*:(?!(amf))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be amf"}';
"~*(PUT|DELETE|PATCH):.*:(?!amf)(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be amf"}';
}
map "$request_method:$uri:$ssl_client_s_dn_cn" $publish_error_message {
default 'SUCCESS';
Expand All @@ -30,12 +30,12 @@ http {
}
map "$request_method:$uri:$ssl_client_s_dn_cn" $security_error_message {
default 'SUCCESS';
"~*DELETE:.*:(?!(aef))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}';
"~*PUT:.*:(?!(invoker))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}';
"~*GET:.*:(?!(aef))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}';
"~*POST:.*/update:(?!(invoker))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}';
"~*POST:.*/delete:(?!(aef))(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}';
"~*POST:.*/token:(?!(invoker))(.*)" '{"error":"unauthorized_client", "error_description":"Role not authorized for this API route"}';
"~*DELETE:.*:(?!aef)(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}';
"~*PUT:.*:(?!invoker)(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}';
"~*GET:.*:(?!aef)(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}';
"~*POST:.*/update:(?!invoker)(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be invoker"}';
"~*POST:.*/delete:(?!aef)(.*)" '{"status":401, "title":"Unauthorized" ,"detail":"Role not authorized for this API route", "cause":"User role must be aef"}';
"~*POST:.*/token:(?!invoker)(.*)" '{"error":"unauthorized_client", "error_description":"Role not authorized for this API route"}';
}
map "$request_method:$uri:$ssl_client_s_dn_cn" $events_error_message {
default 'SUCCESS';
Expand Down

0 comments on commit c8ee1b7

Please sign in to comment.