+logger = o2logging.get_logger(__name__)
+
+
+def _get_k8s_url():
+ try:
+ token_review_url = get_review_url()
+ return token_review_url
+ except Exception:
+ raise Exception('Get k8s token review url failed')
+
+
+FLASK_API_VERSION = '1.0.0'
+
+if auth:
+ # perform service account identity&privilege check.
+ _get_k8s_url()
+ ad = authprov.auth_definer('ad')
+ ad.sanity_check()
+ app.wsgi_app = authmiddleware.authmiddleware(app.wsgi_app)
+