This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
backstageVersion=$(jq -r '.version' backstage.json) | |
createAppVersion=$(curl "https://raw.githubusercontent.com/backstage/backstage/refs/tags/v${backstageVersion}/packages/create-app/package.json" -s | jq -r '.version') | |
echo "Backstage version is: ${backstageVersion}, corresponding create-app version is: ${createAppVersion}" | |
echo "example" | npx "@backstage/create-app@${createAppVersion}" | |
appconfig=app-config.yaml | |
appProductionConfig=app-config.production.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g, group:default/onions_16, role:default/onions_16 | |
p, role:default/onions_16, catalog-entity, read, deny | |
p, role:default/onions_16, catalog-entity, update, allow | |
p, role:default/onions_16, catalog.entity.create, create, allow | |
p, role:default/onions_16, scaffolder.template.step.read, read, allow | |
g, group:default/turnips_17, role:default/turnips_17 | |
p, role:default/turnips_17, catalog-entity, read, allow | |
p, role:default/turnips_17, catalog-entity, update, allow | |
p, role:default/turnips_17, catalog.entity.create, create, deny |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http cli - is python application httpie, nicely prints good formatted response. | |
# Role operations | |
curl -X GET "http://localhost:7007/api/permission/roles" -H "Content-Type: application/json" -H "Authorization: Bearer $token" -v | |
http GET http://localhost:7007/api/permission/roles Authorization:"Bearer $token" | |
curl -X GET "http://localhost:7007/api/permission/roles/role/default/test" -H "Content-Type: application/json" -H "Authorization: Bearer $token" -v | |
http GET http://localhost:7007/api/permission/roles/role/default/test Authorization:"Bearer $token" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apiVersion": "1.0.0", | |
"swaggerVersion": "1.2", | |
"basePath": "", | |
"resourcePath": "/pets", | |
"apis": [ | |
{ | |
"path": "/pets", | |
"operations": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { createContext, useContext, useMemo } from 'react'; | |
import useAsyncFn from 'react-use/lib/useAsyncFn'; | |
import useDebounce from 'react-use/lib/useDebounce'; | |
import { useApi } from '@backstage/core-plugin-api'; | |
import { ErrorResponseBody } from '@backstage/errors'; | |
import { useEntity } from '@backstage/plugin-catalog-react'; | |
import { | |
ANNOTATION_PROVIDER_ID, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# RBAC conditions determine which part of the resource content should be visible to the user. | |
curl -X POST "http://localhost:7007/api/permission/roles" -d '{ "memberReferences": [ "user:default/andrienkoaleksandr" ], "name": "role:default/test" }' -H "Content-Type: application/json" -H "Authorization: Bearer $token" -v | |
# Let's provide read catalog entity permission | |
curl -X POST "http://localhost:7007/api/permission/policies" -d '{"entityReference": "role:default/test", "permission": "catalog-entity", "policy": "read", "effect":"allow"}' -H "Content-Type: application/json" -H "Authorization: Bearer $token" -v | |
# Condition without criteria |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Golang errors": {}, | |
"Issues": [ | |
{ | |
"severity": "HIGH", | |
"confidence": "HIGH", | |
"cwe": { | |
"id": "295", | |
"url": "https://cwe.mitre.org/data/definitions/295.html" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Golang errors": { | |
"/Users/oandriie/projects/tektoncd-results/tools/tkn-results/cmd/list.go": [ | |
{ | |
"line": 9, | |
"column": 2, | |
"error": "could not import github.com/tektoncd/results/tools/tkn-results/internal/flags (invalid package name: \"\")" | |
}, | |
{ | |
"line": 10, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Golang errors": {}, | |
"Issues": [ | |
{ | |
"severity": "HIGH", | |
"confidence": "LOW", | |
"cwe": { | |
"id": "798", | |
"url": "https://cwe.mitre.org/data/definitions/798.html" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eyJraW5kIjogIlRhc2tSdW4iLCAic3BlYyI6IHsicGFyYW1zIjogW3sibmFtZSI6ICJhIiwgInZhbHVlIjogIjEwMCJ9LCB7Im5hbWUiOiAiYiIsICJ2YWx1ZSI6ICI1MDAifV0sICJ0YXNrUmVmIjogeyJraW5kIjogIlRhc2siLCAibmFtZSI6ICJtdWx0aXBseS1wYXJhbXMifSwgInRpbWVvdXQiOiAiMWgwbTBzIiwgInJlc291cmNlcyI6IHt9LCAic2VydmljZUFjY291bnROYW1lIjogInBpcGVsaW5lIn0sICJzdGF0dXMiOiB7InN0ZXBzIjogW3sibmFtZSI6ICJwcm9kdWN0IiwgImltYWdlSUQiOiAicmVnaXN0cnkuYWNjZXNzLnJlZGhhdC5jb20vdWJpOS91YmktbWluaW1hbEBzaGEyNTY6NDMyNDYxMDJjZjM3YjA4MjU3ODZjYTc4ZTlhNmUxNTNjMjZkMWE0MjQxZGRmNTMwOTJlNWIwYWMxOGZlNzdiZiIsICJjb250YWluZXIiOiAic3RlcC1wcm9kdWN0IiwgInRlcm1pbmF0ZWQiOiB7InJlYXNvbiI6ICJDb21wbGV0ZWQiLCAiZXhpdENvZGUiOiAwLCAic3RhcnRlZEF0IjogIjIwMjMtMDMtMjdUMDE6MTQ6MTVaIiwgImZpbmlzaGVkQXQiOiAiMjAyMy0wMy0yN1QwMToxNDoxNVoiLCAiY29udGFpbmVySUQiOiAiY3JpLW86Ly8zZDYzZWUyZWVmYjlhYmI1MjJjOTI3N2NjODk0OGU3Mjk1MTkwMGNlMWRhYTE2MGEyZWIwYzFhNDdjODkzZmMxIn19XSwgInBvZE5hbWUiOiAicGlwZWxpbmVydW4td2l0aC1wYXJhbXMtbXVsdGlwbHktcGFyYW1zLXBvZCIsICJ0YXNrU3BlYyI6IHsic3RlcHMiOiBbeyJuYW1lIjogInByb2R1Y3QiLCAiaW1hZ2UiOiAicmVn |
NewerOlder