Skip to content

Commit

Permalink
Updated teapot to take trusted issuers from the configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
vrbanecd committed Sep 19, 2024
1 parent 9c2c20a commit 2886eac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
5 changes: 1 addition & 4 deletions config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ hostname = teapot
# Port number Teapot is listening on
port = 8081
# List of trusted identity providers
trusted_OP = [
"https://keycloak:8443/realms/test-realm",
"https://aai-demo.egi.eu/auth/realms/egi",
]
trusted_OP = https://keycloak:8443/realms/test-realm, https://aai-demo.egi.eu/auth/realms/egi
# Path to the CA for the DNS certificate
Teapot_CA = /etc/pki/ca-trust/source/anchors/Teapot-testing.crt
# Path to the certificate for the machine's DNS
Expand Down
7 changes: 1 addition & 6 deletions teapot.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,7 @@ async def lifespan(app: FastAPI):

flaat.set_access_levels([AccessLevel("user", HasSubIss())])

flaat.set_trusted_OP_list(
[
"https://keycloak:8443/realms/test-realm",
"https://aai-demo.egi.eu/auth/realms/egi",
]
)
flaat.set_trusted_OP_list(config["Teapot"]["trusted_OP"].split(', '))

# logging is important
LOGFILE = os.environ.get("TEAPOT_LOGFILE", config["Teapot"]["log_location"])
Expand Down

1 comment on commit 2886eac

@vrbanecd
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
32 0 0 32 100 20.405067s

Passed Tests

Name ⏱️ Duration Suite
GET USER1 9.639 s Teapot-Tests
GET USER2 9.679 s Teapot-Tests
GET NO TOKEN 0.013 s Teapot-Tests
GET INVALID TOKEN 0.042 s Teapot-Tests
PUT REQUEST INVALID TOKEN 0.013 s Teapot-Tests
PUT REQUEST NO TOKEN 0.018 s Teapot-Tests
PUT REQUEST USER1 0.203 s Teapot-Tests
PUT REQUEST USER2 0.102 s Teapot-Tests
GET FILE USER1 0.069 s Teapot-Tests
GET FILE USER2 0.064 s Teapot-Tests
GET FILE NO TOKEN 0.010 s Teapot-Tests
GET FILE INVALID TOKEN 0.009 s Teapot-Tests
DELETE REQUEST USER1 0.038 s Teapot-Tests
DELETE REQUEST USER2 0.042 s Teapot-Tests
DELETE REQUEST INVALID TOKEN 0.010 s Teapot-Tests
DELETE REQUEST NO TOKEN 0.010 s Teapot-Tests
GET USER1 EXTRA_AREA 0.037 s Teapot-Tests
GET USER2 EXTRA_AREA 0.046 s Teapot-Tests
GET NO TOKEN EXTRA_AREA 0.010 s Teapot-Tests
GET INVALID TOKEN EXTRA_AREA 0.010 s Teapot-Tests
PUT REQUEST INVALID TOKEN EXTRA_AREA 0.009 s Teapot-Tests
PUT REQUEST NO TOKEN EXTRA_AREA 0.009 s Teapot-Tests
PUT REQUEST USER1 EXTRA_AREA 0.038 s Teapot-Tests
PUT REQUEST USER2 EXTRA_AREA 0.037 s Teapot-Tests
GET FILE USER1 EXTRA_AREA 0.056 s Teapot-Tests
GET FILE USER2 EXTRA_AREA 0.061 s Teapot-Tests
GET FILE NO TOKEN EXTRA_AREA 0.011 s Teapot-Tests
GET FILE INVALID TOKEN EXTRA_AREA 0.009 s Teapot-Tests
DELETE REQUEST USER1 EXTRA_AREA 0.054 s Teapot-Tests
DELETE REQUEST USER2 EXTRA_AREA 0.038 s Teapot-Tests
DELETE REQUEST INVALID TOKEN EXTRA_AREA 0.009 s Teapot-Tests
DELETE REQUEST NO TOKEN EXTRA_AREA 0.009 s Teapot-Tests

Please sign in to comment.