-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
26 additions
and
1,368 deletions.
There are no files selected for viewing
This file contains 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
10 changes: 0 additions & 10 deletions
10
felles/abac/src/main/java/no/nav/vedtak/sikkerhet/abac/PdpKlient.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
felles/abac/src/main/java/no/nav/vedtak/sikkerhet/abac/Pep.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
package no.nav.vedtak.sikkerhet.abac; | ||
|
||
import no.nav.foreldrepenger.konfig.Environment; | ||
import no.nav.vedtak.sikkerhet.abac.internal.BeskyttetRessursAttributter; | ||
|
||
public interface Pep { | ||
|
||
AbacResultat vurderTilgang(BeskyttetRessursAttributter beskyttetRessursAttributter); | ||
|
||
default String pepId() { | ||
return Environment.current().getNaisAppName(); | ||
} | ||
} |
70 changes: 0 additions & 70 deletions
70
felles/abac/src/main/java/no/nav/vedtak/sikkerhet/abac/Token.java
This file was deleted.
Oops, something went wrong.
19 changes: 5 additions & 14 deletions
19
felles/abac/src/main/java/no/nav/vedtak/sikkerhet/abac/beskyttet/ActionType.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
package no.nav.vedtak.sikkerhet.abac.beskyttet; | ||
|
||
public enum ActionType { | ||
READ("read"), | ||
UPDATE("update"), | ||
CREATE("create"), | ||
DELETE("delete"), | ||
READ, | ||
UPDATE, | ||
CREATE, | ||
DELETE, | ||
|
||
/** | ||
* Skal kun brukes av Interceptor | ||
*/ | ||
DUMMY(null); | ||
DUMMY; | ||
|
||
private String eksternKode; | ||
|
||
ActionType(String eksternKode) { | ||
this.eksternKode = eksternKode; | ||
} | ||
|
||
public String getEksternKode() { | ||
return eksternKode; | ||
} | ||
} |
39 changes: 10 additions & 29 deletions
39
felles/abac/src/main/java/no/nav/vedtak/sikkerhet/abac/beskyttet/ResourceType.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,25 @@ | ||
package no.nav.vedtak.sikkerhet.abac.beskyttet; | ||
|
||
import static no.nav.vedtak.sikkerhet.abac.policy.ForeldrepengerAttributter.RESOURCE_TYPE_FP_APPLIKASJON; | ||
import static no.nav.vedtak.sikkerhet.abac.policy.ForeldrepengerAttributter.RESOURCE_TYPE_FP_AVDELINGENHET; | ||
import static no.nav.vedtak.sikkerhet.abac.policy.ForeldrepengerAttributter.RESOURCE_TYPE_FP_DRIFT; | ||
import static no.nav.vedtak.sikkerhet.abac.policy.ForeldrepengerAttributter.RESOURCE_TYPE_FP_FAGSAK; | ||
import static no.nav.vedtak.sikkerhet.abac.policy.ForeldrepengerAttributter.RESOURCE_TYPE_FP_OPPGAVESTYRING; | ||
import static no.nav.vedtak.sikkerhet.abac.policy.ForeldrepengerAttributter.RESOURCE_TYPE_FP_UTTAKSPLAN; | ||
import static no.nav.vedtak.sikkerhet.abac.policy.ForeldrepengerAttributter.RESOURCE_TYPE_FP_VENTEFRIST; | ||
import static no.nav.vedtak.sikkerhet.abac.policy.ForeldrepengerAttributter.RESOURCE_TYPE_INTERNAL_PIP; | ||
|
||
public enum ResourceType { | ||
|
||
// Til bruk i annotering | ||
APPLIKASJON(RESOURCE_TYPE_FP_APPLIKASJON), | ||
DRIFT(RESOURCE_TYPE_FP_DRIFT), | ||
FAGSAK(RESOURCE_TYPE_FP_FAGSAK), | ||
VENTEFRIST(RESOURCE_TYPE_FP_VENTEFRIST), | ||
APPLIKASJON, | ||
DRIFT, | ||
FAGSAK, | ||
VENTEFRIST, | ||
// LOS | ||
OPPGAVESTYRING_AVDELINGENHET(RESOURCE_TYPE_FP_AVDELINGENHET), | ||
OPPGAVESTYRING(RESOURCE_TYPE_FP_OPPGAVESTYRING), | ||
// OPPGAVEKØ(RESOURCE_TYPE_FP_OPPGAVEKØ), TODO: Vurder om skal brukes for å lese oppgaver for LOS. Nå brukes FAGSAK | ||
OPPGAVESTYRING_AVDELINGENHET, | ||
OPPGAVESTYRING, | ||
// OPPGAVEKØ, TODO: Vurder om skal brukes for å lese oppgaver for LOS. Nå brukes FAGSAK | ||
|
||
// Selvbetjening | ||
UTTAKSPLAN(RESOURCE_TYPE_FP_UTTAKSPLAN), | ||
UTTAKSPLAN, | ||
|
||
// Til bruk i annotering for endepunkt som er PIP-tjenester | ||
PIP(RESOURCE_TYPE_INTERNAL_PIP), | ||
PIP, | ||
|
||
/** | ||
* Skal kun brukes av Interceptor | ||
*/ | ||
DUMMY(""); | ||
|
||
private final String resourceTypeAttribute; | ||
|
||
ResourceType(String resourceTypeAttribute) { | ||
this.resourceTypeAttribute = resourceTypeAttribute; | ||
} | ||
|
||
public String getResourceTypeAttribute() { | ||
return this != DUMMY ? resourceTypeAttribute : null; | ||
} | ||
DUMMY | ||
} |
This file contains 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
This file contains 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
This file contains 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
9 changes: 0 additions & 9 deletions
9
felles/abac/src/main/java/no/nav/vedtak/sikkerhet/pdp/PdpConsumer.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.