apache / apache/openwhisk-wskdeploy
require-whisk-auth in actions/sequences is not working
- Dominant language
- Go
- Stars
- 75
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
* Specifying `require-whisk-auth` in actions isn't working as mentioned in the [docs](
https://github.com/apache/incubator-openwhisk-wskdeploy/blob/master/specification/html/spec_actions.md#fields)
```yaml
[.]:
version:
function:
code:
runtime: [@<[range of ]version>]
inputs:
outputs:
limits:
feed: # default: false
web | web-export: | yes | no | raw
raw-http:
docker:
native:
final:
web-custom-options:
require-whisk-auth:
main:
```
Error:
```
Error: manifest_parser.go [115]: [ERROR_YAML_PARSER_ERROR]: File: [manifest.yaml]:
==> yaml: unmarshal errors:
==> line 6: field require-whisk-auth not found in struct parsers.Action
```
* It works when using it in the `annotations` key (suggested here: #712)
Example:
```yaml
---
packages:
test-package:
actions:
hello-action:
function: test.js
runtime: nodejs:10
web: true
annotations:
require-whisk-auth: true
```
* Using `true` does not create a random number like what the wsk cli does `wsk action create ... --web true --web-secure true`
```json
wsk action get test-package/hello-action
ok: got action test-package/hello-action
{
"namespace": "/test-package",
"name": "hello-action",
"version": "0.0.1",
"exec": {
"kind": "nodejs:10",
"binary": false
},
"annotations": [
{
"key": "web-export",
"value": true
},
{
"key": "raw-http",
"value": false
},
{
"key": "final",
"value": true
},
{
"key": "require-whisk-auth",
"value": true
},
{
"key": "exec",
"value": "nodejs:10"
}
],
"limits": {
"timeout": 60000,
"memory": 256,
"logs": 10,
"concurrency": 1
},
"publish": false
}
```
Invoking the function via the web api throws an error
```json
curl -H 'x-require-whisk-auth: true' https://us-south.functions.cloud.ibm.com/api/v1/web//test-package/hello-action.json
{
"code": "7787529ef89a1675a9ed2b9c4cde563a",
"error": "Authentication is possible but has failed or not yet been provided."
}
```
Contributor guide
Assessment
This issue has not been assessed yet.