Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misunderstanding in enviroment #3

Open
nvh1307 opened this issue Jun 20, 2023 · 0 comments
Open

misunderstanding in enviroment #3

nvh1307 opened this issue Jun 20, 2023 · 0 comments

Comments

@nvh1307
Copy link

nvh1307 commented Jun 20, 2023

Sorry, I have clone your repository to learn because I also have to implement keycloak into NextJS (using SAML protocol). I can run your project, but when I click button login, it redirected me to keycloak but it's the page not found. So I think I missing a step?.
I think the problem in enviroment in this code below

export const idp = samlify.IdentityProvider({
	metadata: Buffer.from(process.env.IDP_METADATA as string, 'base64'),
});

export const sp = samlify.ServiceProvider({
	entityID: process.env.SP_IDENTITY,
	authnRequestsSigned: true,
	wantMessageSigned: true,
	wantLogoutResponseSigned: true,
	wantLogoutRequestSigned: true,
	wantAssertionsSigned: true,
	signingCert: Buffer.from(process.env.SIGN_B64_CERTIFICATE as string, 'base64'),
	privateKey: Buffer.from(process.env.SIGN_B64_PRIVATE_KEY as string, 'base64'),
	privateKeyPass: process.env.SP_PRIVATE_KEY_PASS,
	assertionConsumerService: [
		{
			Binding: samlify.Constants.namespace.binding.post,
			Location: process.env.SSO_CALLBACK_URL as string,
		},
	],
});

I don't know how to get base64 certificate and private key, private key pass ( sorry but all of this enviroment above =))) I researched but it have many source but none of them give me a solution, that's poor )
So could you tell me where you get private key, certificate also metadata in keycloak.
By the way, I was struggling to find a good tutorial on this, but your approach is actually well thought out. It's very nice and very helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant