Skip to content

Commit

Permalink
Merge pull request #351 from fisuda/feature/basic_authorization
Browse files Browse the repository at this point in the history
Fix basic authorization for Wilma
  • Loading branch information
fisuda committed Oct 7, 2023
2 parents 69c94ff + b0110d7 commit c3afa16
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## FIWARE Big Bang v0.36.0-next

- Fix basic authorization for Wilma (#351)
- Fix warnings by lint (#350)
- Update IoT Agent for JSON to 2.4.2 (#349)
- Update IoT Agent for UltraLight to 2.4.2 (#348)
Expand Down
11 changes: 11 additions & 0 deletions lets-fiware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1601,6 +1601,17 @@ setup_elasticsearch() {

add_rsyslog_conf "elasticsearch-db"

setup_wilma "elasticsearch" "${ELASTICSEARCH}"

if ${WILMA_AUTH_ENABLED}; then
local RID
RID=$(${NGSI_GO} applications --host "${IDM}" roles create --aid "${AID}" --name "Full access")
assign_permission_to_rol "${AID}" "${RID}" "GET" "^/.*$"
assign_permission_to_rol "${AID}" "${RID}" "POST" "^/.*$"
${NGSI_GO} applications --host "${IDM}" users --aid "${AID}" assign --rid "${RID}" --uid "${IDM_ADMIN_UID}" > /dev/null
${NGSI_GO} applications --host "${IDM}" trusted --aid "${AID}" add --tid "${ORION_CLIENT_ID}" > /dev/null
fi

ELASTICSEARCH_PASSWORD=$(${DOCKER} run -t --rm "${IMAGE_PWGEN}" | sed -z 's/[\x0d\x0a]//g')

mkdir -p "${DATA_DIR}"/elasticsearch-db
Expand Down
2 changes: 2 additions & 0 deletions tests/script/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ install_wilma_auth_enabled() {
sed -i -e "s/^\(IOTAGENT_HTTP=\).*/\1iotagent-http/" config.sh
sed -i -e "s/^\(IOTA_HTTP_AUTH=\).*/\1bearer/" config.sh
sed -i -e "s/^\(CYGNUS=\).*/\1cygnus/" config.sh
sed -i -e "s/^\(CYGNUS_ELASTICSEARCH=\).*/\1true/" config.sh
sed -i -e "s/^\(ELASTICSEARCH=\).*/\1elasticsearch/" config.sh
sed -i -e "s/^\(COMET=\).*/\1comet/" config.sh
sed -i -e "s/^\(PERSEO=\).*/\1perseo/" config.sh
sed -i -e "s/^\(QUANTUMLEAP=\).*/\1quantumleap/" config.sh
Expand Down

0 comments on commit c3afa16

Please sign in to comment.