Compare commits
No commits in common. '35-pssaas-kerberos-bypass' and 'refactor' have entirely different histories.
35-pssaas-
...
refactor
37 changed files with 170 additions and 1071 deletions
@ -1,45 +0,0 @@ |
|||||||
{ |
|
||||||
"product-id": "jochrist-dev-test-rhbq", |
|
||||||
"is-managed-service": false, |
|
||||||
"cpaas-version": "latest", |
|
||||||
"component-list":[ |
|
||||||
{"build-id":"AZ2HRIN2S7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ2JABY727AAA","type":"pnc"}, |
|
||||||
{"build-id":"AZ2JRSQZC7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ2Z2WLAK7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ4AMGCV27AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ4A5CSJC7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ4B7LCNC7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ4CLXF4K7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ4CMZK6S7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ4C62YEC7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ4DGFNK27AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ4DIMTNS7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ4KSFVIC7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ4VFB7XK7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ4WLXXFC7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ5JPS7SK7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ5LC7M327AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ5LQCKAC7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ5LW6NGS7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ5MHDELK7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ5ONFXEC7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ5P2MUBK7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ5QJ7VPK7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ5RPXHM27AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ5SRVAG27AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ56V4B4K7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ5642PZS7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ6ATGHXC7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ6XRDLCS7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ6YYPCZK7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ62QFTQ27AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ65EUXBC7AAC","type":"pnc"}, |
|
||||||
{"build-id":"AZ65VXKKC7AAC","type":"pnc"}, |
|
||||||
{"build-id":"A2ARB7X3S7AAC","type":"pnc"}, |
|
||||||
{"build-id":"A2ARDJ7MS7AAC","type":"pnc"}, |
|
||||||
{"build-id":"A2ARENQ4S7AAC","type":"pnc"}, |
|
||||||
{"build-id":"A2ARFRPLC7AAC","type":"pnc"} |
|
||||||
] |
|
||||||
} |
|
||||||
|
|
||||||
@ -1,8 +0,0 @@ |
|||||||
apiVersion: v1 |
|
||||||
data: |
|
||||||
POSTGRESQL_DATABASE: oshwrapper-db |
|
||||||
POSTGRESQL_USER: scanner |
|
||||||
kind: ConfigMap |
|
||||||
metadata: |
|
||||||
name: database-envs-osh |
|
||||||
namespace: psse-scanchain-prod |
|
||||||
@ -1,21 +0,0 @@ |
|||||||
#oc create route edge --service=osh --dry-run=client -o yaml > edgeroute.yml |
|
||||||
apiVersion: route.openshift.io/v1 |
|
||||||
kind: Route |
|
||||||
metadata: |
|
||||||
creationTimestamp: null |
|
||||||
labels: |
|
||||||
app.kubernetes.io/name: osh |
|
||||||
app.kubernetes.io/version: 1.0.0-SNAPSHOT |
|
||||||
app.openshift.io/runtime: quarkus |
|
||||||
env: prod |
|
||||||
name: osh |
|
||||||
spec: |
|
||||||
port: |
|
||||||
targetPort: http |
|
||||||
tls: |
|
||||||
termination: edge |
|
||||||
to: |
|
||||||
kind: "" |
|
||||||
name: osh |
|
||||||
weight: null |
|
||||||
status: {} |
|
||||||
@ -1,44 +0,0 @@ |
|||||||
#oc create configmap kerberos-config --from-file=linux-krb5.conf --dry-run=client -o yaml > kerberos-config.yaml |
|
||||||
apiVersion: v1 |
|
||||||
data: |
|
||||||
linux-krb5.conf: | |
|
||||||
includedir /etc/krb5.conf.d/ |
|
||||||
|
|
||||||
# depending on your config, you may wish to uncomment the following: |
|
||||||
# includedir /var/lib/sss/pubconf/krb5.include.d/ |
|
||||||
|
|
||||||
[libdefaults] |
|
||||||
default_realm = IPA.REDHAT.COM |
|
||||||
dns_lookup_realm = true |
|
||||||
dns_lookup_kdc = true |
|
||||||
rdns = false |
|
||||||
dns_canonicalize_hostname = false |
|
||||||
ticket_lifetime = 24h |
|
||||||
forwardable = true |
|
||||||
udp_preference_limit = 1 |
|
||||||
default_ccache_name = KEYRING:persistent:%{uid} |
|
||||||
max_retries = 1 |
|
||||||
kdc_timeout = 1500 |
|
||||||
|
|
||||||
[realms] |
|
||||||
|
|
||||||
REDHAT.COM = { |
|
||||||
default_domain = redhat.com |
|
||||||
dns_lookup_kdc = true |
|
||||||
master_kdc = kerberos.corp.redhat.com |
|
||||||
admin_server = kerberos.corp.redhat.com |
|
||||||
} |
|
||||||
|
|
||||||
IPA.REDHAT.COM = { |
|
||||||
default_domain = ipa.redhat.com |
|
||||||
dns_lookup_kdc = true |
|
||||||
# Trust tickets issued by legacy realm on this host |
|
||||||
auth_to_local = RULE:[1:$1@$0](.*@REDHAT\.COM)s/@.*// |
|
||||||
auth_to_local = DEFAULT |
|
||||||
} |
|
||||||
#DO NOT ADD A [domain_realms] section |
|
||||||
#https://mojo.redhat.com/docs/DOC-1166841 |
|
||||||
kind: ConfigMap |
|
||||||
metadata: |
|
||||||
creationTimestamp: null |
|
||||||
name: kerberos-config |
|
||||||
@ -1,36 +0,0 @@ |
|||||||
includedir /etc/krb5.conf.d/ |
|
||||||
|
|
||||||
# depending on your config, you may wish to uncomment the following: |
|
||||||
# includedir /var/lib/sss/pubconf/krb5.include.d/ |
|
||||||
|
|
||||||
[libdefaults] |
|
||||||
default_realm = IPA.REDHAT.COM |
|
||||||
dns_lookup_realm = true |
|
||||||
dns_lookup_kdc = true |
|
||||||
rdns = false |
|
||||||
dns_canonicalize_hostname = false |
|
||||||
ticket_lifetime = 24h |
|
||||||
forwardable = true |
|
||||||
udp_preference_limit = 1 |
|
||||||
default_ccache_name = KEYRING:persistent:%{uid} |
|
||||||
max_retries = 1 |
|
||||||
kdc_timeout = 1500 |
|
||||||
|
|
||||||
[realms] |
|
||||||
|
|
||||||
REDHAT.COM = { |
|
||||||
default_domain = redhat.com |
|
||||||
dns_lookup_kdc = true |
|
||||||
master_kdc = kerberos.corp.redhat.com |
|
||||||
admin_server = kerberos.corp.redhat.com |
|
||||||
} |
|
||||||
|
|
||||||
IPA.REDHAT.COM = { |
|
||||||
default_domain = ipa.redhat.com |
|
||||||
dns_lookup_kdc = true |
|
||||||
# Trust tickets issued by legacy realm on this host |
|
||||||
auth_to_local = RULE:[1:$1@$0](.*@REDHAT\.COM)s/@.*// |
|
||||||
auth_to_local = DEFAULT |
|
||||||
} |
|
||||||
#DO NOT ADD A [domain_realms] section |
|
||||||
#https://mojo.redhat.com/docs/DOC-1166841 |
|
||||||
@ -1,15 +0,0 @@ |
|||||||
apiVersion: v1 |
|
||||||
kind: ServiceAccount |
|
||||||
metadata: |
|
||||||
labels: |
|
||||||
app.kubernetes.io/name: osh |
|
||||||
app.kubernetes.io/version: 1.0.0-SNAPSHOT |
|
||||||
app.openshift.io/runtime: quarkus |
|
||||||
env: prod |
|
||||||
name: osh |
|
||||||
namespace: psse-scanchain-prod |
|
||||||
imagePullSecrets: |
|
||||||
- name: pct-security-osh-wrapper-client-pull-secret |
|
||||||
- name: osh-dockercfg-n2hr7 |
|
||||||
secrets: |
|
||||||
- name: osh-dockercfg-n2hr7 |
|
||||||
@ -1,31 +0,0 @@ |
|||||||
kind: Role |
|
||||||
apiVersion: rbac.authorization.k8s.io/v1 |
|
||||||
metadata: |
|
||||||
labels: |
|
||||||
app.kubernetes.io/component: tekton |
|
||||||
name: osh-wrapper-tekton |
|
||||||
namespace: psse-scanchain-prod |
|
||||||
rules: |
|
||||||
- apiGroups: |
|
||||||
- tekton.dev |
|
||||||
resources: |
|
||||||
- taskruns |
|
||||||
- pipelineruns |
|
||||||
verbs: |
|
||||||
- create |
|
||||||
- get |
|
||||||
- watch |
|
||||||
- list |
|
||||||
--- |
|
||||||
kind: RoleBinding |
|
||||||
apiVersion: rbac.authorization.k8s.io/v1 |
|
||||||
metadata: |
|
||||||
name: osh-wrapper-tekton-rolebinding |
|
||||||
namespace: psse-scanchain-prod |
|
||||||
roleRef: |
|
||||||
apiGroup: rbac.authorization.k8s.io |
|
||||||
kind: Role |
|
||||||
name: osh-wrapper-tekton |
|
||||||
subjects: |
|
||||||
- kind: ServiceAccount |
|
||||||
name: osh |
|
||||||
@ -1,79 +0,0 @@ |
|||||||
apiVersion: v1 |
|
||||||
kind: ConfigMap |
|
||||||
metadata: |
|
||||||
annotations: |
|
||||||
name: kerberos-config-osh-client |
|
||||||
namespace: psse-scanchain-prod |
|
||||||
data: |
|
||||||
linux-krb5.conf: | |
|
||||||
includedir /etc/krb5.conf.d/ |
|
||||||
|
|
||||||
# depending on your config, you may wish to uncomment the following: |
|
||||||
# includedir /var/lib/sss/pubconf/krb5.include.d/ |
|
||||||
|
|
||||||
[libdefaults] |
|
||||||
default_realm = IPA.REDHAT.COM |
|
||||||
dns_lookup_realm = true |
|
||||||
dns_lookup_kdc = true |
|
||||||
rdns = false |
|
||||||
dns_canonicalize_hostname = false |
|
||||||
ticket_lifetime = 24h |
|
||||||
forwardable = true |
|
||||||
udp_preference_limit = 1 |
|
||||||
default_ccache_name = FILE:/tmp/krb5cc_%{uid} |
|
||||||
max_retries = 1 |
|
||||||
kdc_timeout = 1500 |
|
||||||
|
|
||||||
[realms] |
|
||||||
|
|
||||||
REDHAT.COM = { |
|
||||||
default_domain = redhat.com |
|
||||||
dns_lookup_kdc = true |
|
||||||
master_kdc = kerberos.corp.redhat.com |
|
||||||
admin_server = kerberos.corp.redhat.com |
|
||||||
} |
|
||||||
|
|
||||||
IPA.REDHAT.COM = { |
|
||||||
default_domain = ipa.redhat.com |
|
||||||
dns_lookup_kdc = true |
|
||||||
# Trust tickets issued by legacy realm on this host |
|
||||||
auth_to_local = RULE:[1:$1@$0](.*@REDHAT\.COM)s/@.*// |
|
||||||
auth_to_local = DEFAULT |
|
||||||
} |
|
||||||
#DO NOT ADD A [domain_realms] section |
|
||||||
#https://mojo.redhat.com/docs/DOC-1166841 |
|
||||||
|
|
||||||
--- |
|
||||||
#oc create configmap osh-client-config --from-file=client.conf --dry-run=client -o yaml > osh-client-config.yaml |
|
||||||
apiVersion: v1 |
|
||||||
kind: ConfigMap |
|
||||||
metadata: |
|
||||||
name: osh-client-config |
|
||||||
namespace: psse-scanchain-prod |
|
||||||
data: |
|
||||||
client.conf: |+ |
|
||||||
# client config file for covscan |
|
||||||
|
|
||||||
# Hub XML-RPC address. |
|
||||||
HUB_URL = "https://cov01.lab.eng.brq2.redhat.com/covscanhub/xmlrpc" |
|
||||||
BREW_URL = "https://brewhub.engineering.redhat.com/brewhub" |
|
||||||
KOJI_URL = "https://koji.fedoraproject.org/kojihub" |
|
||||||
KOJI_PROFILES = "brew,koji" |
|
||||||
|
|
||||||
CIM_SERVER = "cov01.lab.eng.brq2.redhat.com" |
|
||||||
CIM_PORT = "8080" |
|
||||||
|
|
||||||
DEFAULT_MOCKCONFIG = "fedora-rawhide-x86_64" |
|
||||||
|
|
||||||
# Hub authentication method: "krbv", "password", or "gssapi" |
|
||||||
AUTH_METHOD = "krbv" |
|
||||||
KRB_REALM = "IPA.REDHAT.COM" |
|
||||||
|
|
||||||
# Kerberos principal. If commented, default principal obtained by kinit is used. |
|
||||||
KRB_PRINCIPAL = "HTTP/prodsec-scanchain.apps.ocp-c1.prod.psi.redhat.com" |
|
||||||
|
|
||||||
# Kerberos keytab file. |
|
||||||
KRB_KEYTAB = "/kerberos/kerberos-keytab-osh" |
|
||||||
|
|
||||||
# Enables XML-RPC verbose flag |
|
||||||
DEBUG_XMLRPC = 0 |
|
||||||
@ -1,28 +0,0 @@ |
|||||||
apiVersion: v1 |
|
||||||
kind: PersistentVolumeClaim |
|
||||||
metadata: |
|
||||||
name: osh-client-sources |
|
||||||
namespace: psse-scanchain-prod |
|
||||||
spec: |
|
||||||
accessModes: |
|
||||||
- ReadWriteMany |
|
||||||
resources: |
|
||||||
requests: |
|
||||||
storage: 5Gi |
|
||||||
storageClassName: dynamic-nfs |
|
||||||
volumeMode: Filesystem |
|
||||||
--- |
|
||||||
apiVersion: v1 |
|
||||||
kind: PersistentVolumeClaim |
|
||||||
metadata: |
|
||||||
name: osh-client-source-tars |
|
||||||
namespace: psse-scanchain-prod |
|
||||||
spec: |
|
||||||
accessModes: |
|
||||||
- ReadWriteMany |
|
||||||
resources: |
|
||||||
requests: |
|
||||||
storage: 10Gi |
|
||||||
storageClassName: dynamic-nfs |
|
||||||
volumeMode: Filesystem |
|
||||||
|
|
||||||
@ -1,63 +0,0 @@ |
|||||||
apiVersion: tekton.dev/v1beta1 |
|
||||||
kind: Task |
|
||||||
metadata: |
|
||||||
name: osh-scan-task |
|
||||||
spec: |
|
||||||
stepTemplate: |
|
||||||
env: |
|
||||||
- name: "HOME" |
|
||||||
value: "/tekton/home" |
|
||||||
params: |
|
||||||
- name: buildId |
|
||||||
type: string |
|
||||||
- name: scanProfile |
|
||||||
type: string |
|
||||||
|
|
||||||
volumes: |
|
||||||
- name: osh-client-kerb-vol |
|
||||||
secret: |
|
||||||
defaultMode: 384 |
|
||||||
optional: false |
|
||||||
secretName: kerberos-keytab-osh |
|
||||||
|
|
||||||
- name: osh-client-kerb-config-vol |
|
||||||
configMap: |
|
||||||
name: kerberos-config-osh-client |
|
||||||
items: |
|
||||||
- key: linux-krb5.conf |
|
||||||
path: linux-krb5.conf |
|
||||||
defaultMode: 384 |
|
||||||
optional: false |
|
||||||
|
|
||||||
- name: osh-client-config-vol |
|
||||||
configMap: |
|
||||||
name: osh-client-config |
|
||||||
items: |
|
||||||
- key: client.conf |
|
||||||
path: client.conf |
|
||||||
optional: false |
|
||||||
|
|
||||||
steps: |
|
||||||
- name: perform-buildid-scan |
|
||||||
image: quay.io/pct-security/osh-wrapper-client:latest |
|
||||||
workingDir: /home/covscan |
|
||||||
volumeMounts: |
|
||||||
- name: osh-client-kerb-vol |
|
||||||
mountPath: /kerberos |
|
||||||
readOnly: true |
|
||||||
|
|
||||||
- name: osh-client-config-vol |
|
||||||
mountPath: /etc/osh/client.conf |
|
||||||
readOnly: true |
|
||||||
subPath: client.conf |
|
||||||
|
|
||||||
- name: osh-client-kerb-config-vol |
|
||||||
mountPath: /etc/krb5.conf |
|
||||||
readOnly: true |
|
||||||
subPath: linux-krb5.conf |
|
||||||
|
|
||||||
script: | |
|
||||||
#!/bin/bash |
|
||||||
echo $(params.buildId) |
|
||||||
echo $(params.scanProfile) |
|
||||||
covscan mock-build -p $(params.scanProfile) --brew-build $(params.buildId) |
|
||||||
@ -1,104 +0,0 @@ |
|||||||
apiVersion: tekton.dev/v1beta1 |
|
||||||
kind: Task |
|
||||||
metadata: |
|
||||||
name: osh-scan-scm-task |
|
||||||
spec: |
|
||||||
stepTemplate: |
|
||||||
env: |
|
||||||
- name: "HOME" |
|
||||||
value: "/tekton/home" |
|
||||||
|
|
||||||
params: |
|
||||||
- name: repo-url |
|
||||||
type: string |
|
||||||
description: The SCMURL |
|
||||||
|
|
||||||
- name: revision |
|
||||||
type: string |
|
||||||
description: The revision or tag |
|
||||||
|
|
||||||
- name: mock-build-params |
|
||||||
type: string |
|
||||||
description: Parameters pushed to mock build |
|
||||||
default: "snyk-only-unstable --tarball-build-script=:" |
|
||||||
|
|
||||||
- name: archive-name |
|
||||||
type: string |
|
||||||
description: The name of the git archive file |
|
||||||
default: $(context.taskRun.uid).tar.gz |
|
||||||
|
|
||||||
- name: tarball-storage-dir |
|
||||||
type: string |
|
||||||
description: What directory the scan tar gz will be put into |
|
||||||
default: /workspace/source-tars/$(context.taskRun.name) |
|
||||||
|
|
||||||
- name: working-dir |
|
||||||
type: string |
|
||||||
description: Working directory for the task |
|
||||||
default: /home/covscan |
|
||||||
|
|
||||||
workspaces: |
|
||||||
- name: source-tars |
|
||||||
description: This workspace contains our source tar gzips for covscan and is semi-persistant |
|
||||||
- name: ssl-ca-directory |
|
||||||
description: Location of CA bundle for ssl verification with internal services |
|
||||||
|
|
||||||
|
|
||||||
volumes: |
|
||||||
- name: osh-client-kerb-vol |
|
||||||
secret: |
|
||||||
defaultMode: 384 |
|
||||||
optional: false |
|
||||||
secretName: kerberos-keytab-osh |
|
||||||
|
|
||||||
- name: osh-client-kerb-config-vol |
|
||||||
configMap: |
|
||||||
name: kerberos-config-osh-client |
|
||||||
items: |
|
||||||
- key: linux-krb5.conf |
|
||||||
path: linux-krb5.conf |
|
||||||
defaultMode: 384 |
|
||||||
optional: false |
|
||||||
|
|
||||||
- name: osh-client-config-vol |
|
||||||
configMap: |
|
||||||
name: osh-client-config |
|
||||||
items: |
|
||||||
- key: client.conf |
|
||||||
path: client.conf |
|
||||||
optional: false |
|
||||||
|
|
||||||
steps: |
|
||||||
- name: perform-osh-scm-scan |
|
||||||
image: quay.io/pct-security/osh-wrapper-client:latest |
|
||||||
workingDir: $(params.working-dir) |
|
||||||
|
|
||||||
volumeMounts: |
|
||||||
- name: osh-client-kerb-vol |
|
||||||
mountPath: /kerberos |
|
||||||
readOnly: true |
|
||||||
|
|
||||||
- name: osh-client-config-vol |
|
||||||
mountPath: /etc/osh/client.conf |
|
||||||
readOnly: true |
|
||||||
subPath: client.conf |
|
||||||
|
|
||||||
- name: osh-client-kerb-config-vol |
|
||||||
mountPath: /etc/krb5.conf |
|
||||||
readOnly: true |
|
||||||
subPath: linux-krb5.conf |
|
||||||
|
|
||||||
script: | |
|
||||||
#!/bin/bash |
|
||||||
set -x |
|
||||||
echo $(params.working-dir) |
|
||||||
echo $(params.repo-url) |
|
||||||
echo $(params.revision) |
|
||||||
echo $(params.mock-build-params) |
|
||||||
echo $(params.archive-name) |
|
||||||
git clone -v $(params.repo-url) -b $(params.revision) |
|
||||||
git --git-dir=$(basename $(params.repo-url) .git)/.git archive --format=tar.gz HEAD -o $(params.working-dir)/$(params.archive-name) |
|
||||||
mkdir $(params.tarball-storage-dir) |
|
||||||
cp $(params.working-dir)/$(params.archive-name) $(params.tarball-storage-dir)/ |
|
||||||
|
|
||||||
covscan mock-build $(params.mock-build-params) $(params.working-dir)/$(params.archive-name) |
|
||||||
@ -1,23 +0,0 @@ |
|||||||
apiVersion: batch/v1 |
|
||||||
kind: CronJob |
|
||||||
metadata: |
|
||||||
name: tekton-terminator |
|
||||||
namespace: pct-security-tooling |
|
||||||
spec: |
|
||||||
schedule: "*/50 * * * *" |
|
||||||
concurrencyPolicy: Forbid |
|
||||||
backoffLimit: 2 |
|
||||||
jobTemplate: |
|
||||||
spec: |
|
||||||
template: |
|
||||||
spec: |
|
||||||
serviceAccountName: osh-wrapper-tekton-terminator-sa |
|
||||||
containers: |
|
||||||
- name: tekton-cleanup |
|
||||||
image: quay.io/openshift-pipeline/openshift-pipelines-cli-tkn:1.11 |
|
||||||
imagePullPolicy: IfNotPresent |
|
||||||
command: |
|
||||||
- /bin/sh |
|
||||||
- -c |
|
||||||
- tkn pipelinerun delete --keep 10 -f && tkn taskrun delete --keep 40 -f |
|
||||||
restartPolicy: Never |
|
||||||
@ -1,43 +0,0 @@ |
|||||||
apiVersion: v1 |
|
||||||
kind: ServiceAccount |
|
||||||
metadata: |
|
||||||
namespace: pct-security-tooling |
|
||||||
name: osh-wrapper-tekton-terminator-sa |
|
||||||
labels: |
|
||||||
app.kubernetes.io/name: osh-wrapper-tekton-terminator |
|
||||||
env: stage |
|
||||||
imagePullSecrets: |
|
||||||
- name: pct-security-osh-wrapper-client-pull-secret |
|
||||||
--- |
|
||||||
kind: Role |
|
||||||
apiVersion: rbac.authorization.k8s.io/v1 |
|
||||||
metadata: |
|
||||||
name: osh-wrapper-tekton-terminator |
|
||||||
labels: |
|
||||||
app.kubernetes.io/component: tekton |
|
||||||
namespace: pct-security-tooling |
|
||||||
rules: |
|
||||||
- apiGroups: |
|
||||||
- tekton.dev |
|
||||||
resources: |
|
||||||
- taskruns |
|
||||||
- pipelineruns |
|
||||||
verbs: |
|
||||||
- get |
|
||||||
- list |
|
||||||
- delete |
|
||||||
- update |
|
||||||
--- |
|
||||||
kind: RoleBinding |
|
||||||
apiVersion: rbac.authorization.k8s.io/v1 |
|
||||||
metadata: |
|
||||||
name: osh-wrapper-tekton-terminator-rolebinding |
|
||||||
namespace: pct-security-tooling |
|
||||||
roleRef: |
|
||||||
apiGroup: rbac.authorization.k8s.io |
|
||||||
kind: Role |
|
||||||
name: osh-wrapper-tekton-terminator |
|
||||||
subjects: |
|
||||||
- kind: ServiceAccount |
|
||||||
name: osh-wrapper-tekton-terminator-sa |
|
||||||
|
|
||||||
@ -1,34 +0,0 @@ |
|||||||
package com.redhat.pctsec.model.api.request; |
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty; |
|
||||||
import jakarta.validation.constraints.NotNull; |
|
||||||
|
|
||||||
import java.net.URI; |
|
||||||
|
|
||||||
|
|
||||||
public class scanChainGit { |
|
||||||
|
|
||||||
|
|
||||||
private URI repo; |
|
||||||
private String ref; |
|
||||||
public scanChainGit(@NotNull URI repo, @NotNull String ref) { |
|
||||||
this.repo = repo; |
|
||||||
this.ref = ref; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
@NotNull |
|
||||||
@JsonProperty("url") |
|
||||||
public URI getRepo() { |
|
||||||
return this.repo; |
|
||||||
} |
|
||||||
|
|
||||||
@NotNull |
|
||||||
@JsonProperty("branch") |
|
||||||
public String getRef() { |
|
||||||
|
|
||||||
return this.ref; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,12 +0,0 @@ |
|||||||
package com.redhat.pctsec.model.api.service; |
|
||||||
import jakarta.ws.rs.*; |
|
||||||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; |
|
||||||
import org.jboss.pnc.dto.Build; |
|
||||||
|
|
||||||
@Path("pnc-rest/v2/builds") |
|
||||||
@RegisterRestClient |
|
||||||
public interface AltPncService { |
|
||||||
@GET |
|
||||||
@Path("{id}") |
|
||||||
Build getBuild(@PathParam("id") String id); |
|
||||||
} |
|
||||||
@ -1,49 +0,0 @@ |
|||||||
package com.redhat.pctsec.rest.v1alpha1; |
|
||||||
import jakarta.ws.rs.core.Application; |
|
||||||
import org.eclipse.microprofile.openapi.annotations.Components; |
|
||||||
import org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition; |
|
||||||
import org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType; |
|
||||||
import org.eclipse.microprofile.openapi.annotations.info.Contact; |
|
||||||
import org.eclipse.microprofile.openapi.annotations.info.Info; |
|
||||||
import org.eclipse.microprofile.openapi.annotations.info.License; |
|
||||||
import org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement; |
|
||||||
import org.eclipse.microprofile.openapi.annotations.security.SecurityScheme; |
|
||||||
import org.eclipse.microprofile.openapi.annotations.tags.Tag; |
|
||||||
|
|
||||||
@OpenAPIDefinition( |
|
||||||
tags = { |
|
||||||
//@Tag(name="widget", description="Widget operations."),
|
|
||||||
//@Tag(name="gasket", description="Operations related to gaskets")
|
|
||||||
}, |
|
||||||
info = @Info( |
|
||||||
title="Example API", |
|
||||||
version = "1.0.1", |
|
||||||
contact = @Contact( |
|
||||||
name = "Example API Support", |
|
||||||
url = "http://exampleurl.com/contact", |
|
||||||
email = "techsupport@example.com"), |
|
||||||
license = @License( |
|
||||||
name = "Apache 2.0", |
|
||||||
url = "https://www.apache.org/licenses/LICENSE-2.0.html")), |
|
||||||
components = @Components( |
|
||||||
securitySchemes = { |
|
||||||
@SecurityScheme( |
|
||||||
securitySchemeName = "Kerberos", |
|
||||||
type = SecuritySchemeType.HTTP, |
|
||||||
scheme = "Negotiate" |
|
||||||
//bearerFormat = "JWT"
|
|
||||||
), |
|
||||||
@SecurityScheme( |
|
||||||
securitySchemeName = "basic", |
|
||||||
type = SecuritySchemeType.HTTP, |
|
||||||
scheme = "basic" |
|
||||||
) |
|
||||||
} |
|
||||||
), |
|
||||||
security = { |
|
||||||
@SecurityRequirement(name = "Kerberos"), |
|
||||||
@SecurityRequirement(name = "basic") |
|
||||||
} |
|
||||||
) |
|
||||||
public class OshWrapperApiApplication extends Application { |
|
||||||
} |
|
||||||
@ -1,6 +1,5 @@ |
|||||||
package com.redhat.pctsec.model.test; |
package com.redhat.pctsec.model.osh; |
||||||
|
|
||||||
import com.redhat.pctsec.model.osh.paramMapper; |
|
||||||
import io.quarkus.test.junit.QuarkusTest; |
import io.quarkus.test.junit.QuarkusTest; |
||||||
import jakarta.inject.Inject; |
import jakarta.inject.Inject; |
||||||
import org.junit.jupiter.api.Test; |
import org.junit.jupiter.api.Test; |
||||||
@ -1,19 +0,0 @@ |
|||||||
package com.redhat.pctsec.model.test; |
|
||||||
|
|
||||||
import com.redhat.pctsec.model.PNCBuild; |
|
||||||
import io.quarkus.test.junit.QuarkusTest; |
|
||||||
import jakarta.inject.Inject; |
|
||||||
import org.junit.jupiter.api.Test; |
|
||||||
|
|
||||||
@QuarkusTest |
|
||||||
public class PNCBuildTest { |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Test |
|
||||||
public void testBuildFetch(){ |
|
||||||
PNCBuild pb = new PNCBuild("AZAQZSPFDRQAA"); |
|
||||||
System.out.println(pb.SCMURL()); |
|
||||||
System.out.println(pb.revision()); |
|
||||||
} |
|
||||||
} |
|
||||||
Loading…
Reference in new issue