# Enables or disables fatal status of deprecations. (boolean value)
#fatal_deprecations = false
+[aaf_authentication]
+
+#
+# From conductor
+#
+
+# is_aaf_enabled. (boolean value)
+is_aaf_enabled = false
+
+# aaf_cache_expiry_hrs. (integer value)
+#aaf_cache_expiry_hrs = 3
+
+# aaf_url. (string value)
+aaf_url = http://aaf-service:8100/authz/perms/user/
+
+# aaf_retries. (integer value)
+#aaf_retries = 3
+
+# aaf_timeout. (integer value)
+#aaf_timeout = 100
+
+# aaf_user_roles. (list value)
+#aaf_user_roles = {"type": "org.onap.oof","instance": "plans","action": "GET"},{"type": "org.onap.oof","instance": "plans","action": "POST"}
+
[aaf_sms]
if perms and datetime.now() < perms.get(EXPIRE_TIME):
LOG.debug("Returning cached value")
- return perms
+ return perms['roles']
LOG.debug("Invoking AAF authentication API")
response = remote_api(passwd, uid)
perms = {EXPIRE_TIME: datetime.now() + time_delta, 'roles': response}
user_pw = auth_str.split(' ')[1]
decode_user_pw = base64.b64decode(user_pw)
list_id_pw = decode_user_pw.split(':')
- user_dict['username'] = list_id_pw[0]
- user_dict['password'] = list_id_pw[1]
+ user_dict['username'] = str(list_id_pw[0])
+ user_dict['password'] = str(list_id_pw[1])
password = CONF.conductor_api.password
username = CONF.conductor_api.username
# Install any needed packages specified in requirements.txt
RUN pip install web.py
+RUN pip install oslo.log
# Make port 80 available to the world outside this container
-EXPOSE 8081
+EXPOSE 8100
# Define environment variable
ENV NAME aafsim
# Run aafsim.py when the container launches
-CMD ["/bin/sh", "-c", "python -u aafsim.py 8081 > /tmp/aafsim.log 2>&1"]
+CMD ["/bin/sh", "-c", "python -u aafsim.py 8100 > /tmp/aafsim.log 2>&1"]
#
# -------------------------------------------------------------------------
#
-# Note mapping to external port 8082. avoids conflict with aaisim
-docker run -d --name aafsim -p 8082:8081 aafsim
+# Note mapping to external port 8100. avoids conflict with aaisim
+docker run -d --name aafsim -p 8100:8100 aafsim